aboutsummaryrefslogtreecommitdiffstats
path: root/src/initlog.c
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-10-27 19:36:53 +0000
committerBill Nottingham <notting@redhat.com>2005-10-27 19:36:53 +0000
commitea25bdad2ee1406d26518b41fc8141e6e09317bf (patch)
treed330a29bb6ff33d8ed05a43af2b971530f5cf367 /src/initlog.c
parent88954b1c41cbe771f7875a96f03a2f7c4d4483a5 (diff)
downloadinitscripts-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.c5
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) {