summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/KerneloopsSysLog.h
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2009-06-20 23:22:41 +0200
committerAnton Arapov <aarapov@redhat.com>2009-06-20 23:22:41 +0200
commit7342d3896446deaf89ab5582da81457571e48fe6 (patch)
tree8461c8f4249d08c65e8aecc7785bb770912283a7 /lib/Plugins/KerneloopsSysLog.h
parent7ea90a7e6e836257e05d2f9f6b5ad0f9aab88c23 (diff)
downloadabrt-7342d3896446deaf89ab5582da81457571e48fe6.tar.gz
abrt-7342d3896446deaf89ab5582da81457571e48fe6.tar.xz
abrt-7342d3896446deaf89ab5582da81457571e48fe6.zip
Handle logs with NUL chars better
It is not too rare that '\0' chars appear in /var/log/messages. I saw a real-life case where kerneloops would show a popup with the same old oops after every login. It turned out that there were NUL chars in the log which prevented kerneloops from seeing its marker, so it always treated the old oops in the log as new. This patch fixes it by always going through the whole known length of the buffer (not stopping on NUL chars) and using less string-oriented functions in fill_lineinfo().
Diffstat (limited to 'lib/Plugins/KerneloopsSysLog.h')
-rw-r--r--lib/Plugins/KerneloopsSysLog.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Plugins/KerneloopsSysLog.h b/lib/Plugins/KerneloopsSysLog.h
index c233d993..ff4c8ba2 100644
--- a/lib/Plugins/KerneloopsSysLog.h
+++ b/lib/Plugins/KerneloopsSysLog.h
@@ -42,7 +42,7 @@ class CSysLog
private:
void QueueOops(char *data, char *version);
int ExtractVersion(char *linepointer, char *version);
- int FillLinePointers(char *buffer, int remove_syslog);
+ int FillLinePointers(char *buffer, size_t buflen, int remove_syslog);
std::list<COops> m_OopsQueue;
int m_nFoundOopses;