From: florian Date: Wed, 1 Jul 2009 14:58:15 +0000 (+0000) Subject: [tools] fix segfault when using the maxlen argument (#4359) X-Git-Url: https://git.rohieb.name/openwrt.git/commitdiff_plain/3811f77e30bd1ced9f69708b3dbcf28bf3ba88d1 [tools] fix segfault when using the maxlen argument (#4359) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16641 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/tools/firmware-utils/src/trx.c b/tools/firmware-utils/src/trx.c index 1ad3de54f..5e5e77a49 100644 --- a/tools/firmware-utils/src/trx.c +++ b/tools/firmware-utils/src/trx.c @@ -172,6 +172,7 @@ int main(int argc, char **argv) fprintf(stderr, "realloc failed"); return EXIT_FAILURE; } + p = (struct trx_header *) buf; break; case 'a': errno = 0;