From eaa0cdd6a162139406b24114aa6c5f27da3b1af0 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Thu, 26 Feb 2009 02:33:18 -0800 Subject: Oops, malloc(array[int]) didn't do what I thought. --- pbstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pbstream.c') diff --git a/pbstream.c b/pbstream.c index ce14004..4ce8cc3 100644 --- a/pbstream.c +++ b/pbstream.c @@ -293,7 +293,7 @@ void pbstream_init_parser( { state->offset = 0; /* We match proto2's limit of 64 for maximum stack depth. */ - state->top = state->base = malloc(sizeof(state->base[64])); + state->top = state->base = malloc(64*sizeof(*state->base)); state->limit = state->base + 64; state->top->fieldset = toplevel_fieldset; state->top->end_offset = SIZE_MAX; -- cgit v1.2.3