diff options
author | Bill Nottingham <notting@redhat.com> | 2005-10-27 19:36:53 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-10-27 19:36:53 +0000 |
commit | ea25bdad2ee1406d26518b41fc8141e6e09317bf (patch) | |
tree | d330a29bb6ff33d8ed05a43af2b971530f5cf367 /src/initlog.c | |
parent | 88954b1c41cbe771f7875a96f03a2f7c4d4483a5 (diff) | |
download | initscripts-ea25bdad2ee1406d26518b41fc8141e6e09317bf.tar initscripts-ea25bdad2ee1406d26518b41fc8141e6e09317bf.tar.gz initscripts-ea25bdad2ee1406d26518b41fc8141e6e09317bf.tar.bz2 initscripts-ea25bdad2ee1406d26518b41fc8141e6e09317bf.tar.xz initscripts-ea25bdad2ee1406d26518b41fc8141e6e09317bf.zip |
fix use-after-free (#171912)
Diffstat (limited to 'src/initlog.c')
-rw-r--r-- | src/initlog.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/initlog.c b/src/initlog.c index ae110675..20316095 100644 --- a/src/initlog.c +++ b/src/initlog.c @@ -249,7 +249,10 @@ int logLine(struct logInfo *logEnt) { ) { DDEBUG("starting daemon failed, pooling entry %d\n",logEntries); logData=realloc(logData,(logEntries+1)*sizeof(struct logInfo)); - logData[logEntries]= (*logEnt); + logData[logEntries].fac = logEnt->fac; + logData[logEntries].pri = logEnt->pri; + logData[logEntries].cmd = strdup(logEnt->cmd); + logData[logEntries].line = strdup(logEnt->line); logEntries++; } else { if (logEntries>0) { |