Patch from larry doolittle to make sure we don't realloc
a pointer that was not yet malloced mem.
This commit is contained in:
parent
5a964f9d0b
commit
d323d32c5b
1
logger.c
1
logger.c
@ -151,6 +151,7 @@ extern int logger_main(int argc, char **argv)
|
||||
} else {
|
||||
if (argc >= 1) {
|
||||
int len = 1; /* for the '\0' */
|
||||
message=xcalloc(1, 1);
|
||||
for (; *argv != NULL; argv++) {
|
||||
len += strlen(*argv);
|
||||
len += 1; /* for the space between the args */
|
||||
|
@ -151,6 +151,7 @@ extern int logger_main(int argc, char **argv)
|
||||
} else {
|
||||
if (argc >= 1) {
|
||||
int len = 1; /* for the '\0' */
|
||||
message=xcalloc(1, 1);
|
||||
for (; *argv != NULL; argv++) {
|
||||
len += strlen(*argv);
|
||||
len += 1; /* for the space between the args */
|
||||
|
Loading…
Reference in New Issue
Block a user