projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[tools] fix segfault when using the maxlen argument (#4359)
[openwrt.git]
/
tools
/
firmware-utils
/
src
/
trx.c
diff --git
a/tools/firmware-utils/src/trx.c
b/tools/firmware-utils/src/trx.c
index
1131238
..
5e5e77a
100644
(file)
--- a/
tools/firmware-utils/src/trx.c
+++ b/
tools/firmware-utils/src/trx.c
@@
-88,7
+88,7
@@
int main(int argc, char **argv)
char *ofn = NULL;
char *buf;
char *e;
char *ofn = NULL;
char *buf;
char *e;
- int c, i, append;
+ int c, i, append
= 0
;
size_t n;
uint32_t cur_len;
unsigned long maxlen = TRX_MAX_LEN;
size_t n;
uint32_t cur_len;
unsigned long maxlen = TRX_MAX_LEN;
@@
-172,6
+172,7
@@
int main(int argc, char **argv)
fprintf(stderr, "realloc failed");
return EXIT_FAILURE;
}
fprintf(stderr, "realloc failed");
return EXIT_FAILURE;
}
+ p = (struct trx_header *) buf;
break;
case 'a':
errno = 0;
break;
case 'a':
errno = 0;
@@
-230,7
+231,7
@@
int main(int argc, char **argv)
}
fclose(out);
}
fclose(out);
-
+
return EXIT_SUCCESS;
}
return EXIT_SUCCESS;
}
This page took
0.023226 seconds
and
4
git commands to generate.