X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=lib%2Fccdbg-hex.c;h=dfea915601a74e6258d8c6427b885eaf300870c5;hp=86478da07b8c5f262c6adfb675cccf6aa11f2528;hb=17d2432a8b9c15963cd3b821f025ad33972ef477;hpb=8a9a3f02b951382573ff74dd6ce5a1c0f335fa86 diff --git a/lib/ccdbg-hex.c b/lib/ccdbg-hex.c index 86478da0..dfea9156 100644 --- a/lib/ccdbg-hex.c +++ b/lib/ccdbg-hex.c @@ -147,7 +147,7 @@ ccdbg_hex_read_record(struct hex_input *input) --nhexbytes; if (nhexbytes != 0) break; - + switch (state) { case read_length: record = ccdbg_hex_alloc(hex); @@ -261,7 +261,7 @@ ccdbg_hex_file_read(FILE *file, char *name) goto bail; if (hex->nrecord == srecord) { srecord *= 2; - newhex = realloc(hex, + newhex = realloc(hex, sizeof (struct hex_file) + srecord * sizeof (struct hex_record *)); if (!newhex)