summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-07-01 14:58:15 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-07-01 14:58:15 +0000
commit3811f77e30bd1ced9f69708b3dbcf28bf3ba88d1 (patch)
treec511a2572248403fa212688c07d28b9ae46c6014
parent69aab5b0cc0bdc5a5fcc28ecec44edad3721fcd7 (diff)
[tools] fix segfault when using the maxlen argument (#4359)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16641 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--tools/firmware-utils/src/trx.c1
1 files changed, 1 insertions, 0 deletions
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;