mirror of
https://github.com/sheumann/hush.git
synced 2024-08-20 19:29:02 +00:00
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 {
|
} else {
|
||||||
if (argc >= 1) {
|
if (argc >= 1) {
|
||||||
int len = 1; /* for the '\0' */
|
int len = 1; /* for the '\0' */
|
||||||
|
message=xcalloc(1, 1);
|
||||||
for (; *argv != NULL; argv++) {
|
for (; *argv != NULL; argv++) {
|
||||||
len += strlen(*argv);
|
len += strlen(*argv);
|
||||||
len += 1; /* for the space between the args */
|
len += 1; /* for the space between the args */
|
||||||
|
@ -151,6 +151,7 @@ extern int logger_main(int argc, char **argv)
|
|||||||
} else {
|
} else {
|
||||||
if (argc >= 1) {
|
if (argc >= 1) {
|
||||||
int len = 1; /* for the '\0' */
|
int len = 1; /* for the '\0' */
|
||||||
|
message=xcalloc(1, 1);
|
||||||
for (; *argv != NULL; argv++) {
|
for (; *argv != NULL; argv++) {
|
||||||
len += strlen(*argv);
|
len += strlen(*argv);
|
||||||
len += 1; /* for the space between the args */
|
len += 1; /* for the space between the args */
|
||||||
|
Loading…
Reference in New Issue
Block a user