diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 5f3fda04..1970d51d 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,7 @@ +2003-07-16 Marcel Telka + + * src/jtag.c (jtag_parse_line): Fixed invalid memory allocation size (core dump). + 2003-07-01 Marcel Telka * include/bus.h (new_sh7750r_bus, new_bcm1250_bus): New function declarations (patch 753300, Matan Ziv-Av). diff --git a/jtag/NEWS b/jtag/NEWS index c724d6cb..d0656822 100644 --- a/jtag/NEWS +++ b/jtag/NEWS @@ -12,6 +12,7 @@ See libbrux/NEWS for more news. - removed explicit JTAG chain length detection (patch 753298, Matan Ziv-Av) - simplified output messages - removed support for report results to file + * Fixed invalid memory allocation size (core dump) in jtag_parse_line() function. * Minor bugs fixed. jtag-0.4 (2003-05-29): diff --git a/jtag/src/jtag.c b/jtag/src/jtag.c index 77021b4d..827fd865 100644 --- a/jtag/src/jtag.c +++ b/jtag/src/jtag.c @@ -151,7 +151,7 @@ jtag_parse_line( char *line ) if (n + 2 > l) { char **newa; l = (l < 16) ? 16 : (l * 2); - newa = realloc( a, l ); + newa = realloc( a, l * sizeof (char *) ); if (!newa) { free( a ); printf( _("Out of memory\n") );