Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
rsyslog.24024
0001-pmaixforwardedfrom-bugfix-potential-misadr...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-pmaixforwardedfrom-bugfix-potential-misadressing.patch of Package rsyslog.24024
From 10549ba915556c557b22b3dac7e4cb73ad22d3d8 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards <rgerhards@adiscon.com> Date: Fri, 27 Sep 2019 13:36:02 +0200 Subject: [PATCH] pmaixforwardedfrom bugfix: potential misadressing --- contrib/pmaixforwardedfrom/pmaixforwardedfrom.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contrib/pmaixforwardedfrom/pmaixforwardedfrom.c b/contrib/pmaixforwardedfrom/pmaixforwardedfrom.c index 37157c7d4..ebf12ebbe 100644 --- a/contrib/pmaixforwardedfrom/pmaixforwardedfrom.c +++ b/contrib/pmaixforwardedfrom/pmaixforwardedfrom.c @@ -109,6 +109,10 @@ CODESTARTparse /* bump the message portion up by skipLen(23 or 5) characters to overwrite the "Message forwarded from " or "From " with the hostname */ lenMsg -=skipLen; + if(lenMsg < 2) { + dbgprintf("not a AIX message forwarded from message has nothing after header\n"); + ABORT_FINALIZE(RS_RET_COULD_NOT_PARSE); + } memmove(p2parse, p2parse + skipLen, lenMsg); *(p2parse + lenMsg) = '\n'; *(p2parse + lenMsg + 1) = '\0'; @@ -120,6 +124,11 @@ really an AIX log, but has a similar preamble */ --lenMsg; ++p2parse; } + if (lenMsg < 1) { + dbgprintf("not a AIX message forwarded from message has nothing after colon " + "or no colon at all\n"); + ABORT_FINALIZE(RS_RET_COULD_NOT_PARSE); + } if (lenMsg && *p2parse != ':') { DBGPRINTF("not a AIX message forwarded from mangled log but similar enough that the preamble has " "been removed\n"); -- 2.16.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor