Dirk Mueller
2144a0b3f4
Copy from home:jengelh:branches:Base:System/syslogd via accept of submit request 28151 revision 3. Request was accepted with message: thanks! OBS-URL: https://build.opensuse.org/request/show/28151 OBS-URL: https://build.opensuse.org/package/show/Base:System/syslogd?expand=0&rev=12
48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
Index: klogd.c
|
|
===================================================================
|
|
--- klogd.c.orig 2009-11-24 18:12:54.840288000 +0100
|
|
+++ klogd.c 2009-11-24 18:12:55.564210000 +0100
|
|
@@ -740,7 +740,7 @@ static void LogLine(char *ptr, int len)
|
|
switch( parse_state )
|
|
{
|
|
case PARSING_TEXT:
|
|
- delta = copyin( line, space, ptr, len, "\n[%" );
|
|
+ delta = copyin( line, space, ptr, len, "\n[" );
|
|
line += delta;
|
|
ptr += delta;
|
|
space -= delta;
|
|
@@ -796,30 +796,9 @@ static void LogLine(char *ptr, int len)
|
|
parse_state = PARSING_SYMSTART; /* at < */
|
|
break;
|
|
}
|
|
- if( *ptr == '%' ) /* dangerous printf marker */
|
|
- {
|
|
- delta = 0;
|
|
- while (len && *ptr == '%')
|
|
- {
|
|
- *line++ = *ptr++; /* copy it in */
|
|
- space -= 1;
|
|
- len -= 1;
|
|
- delta++;
|
|
- }
|
|
- if (delta % 2) /* odd amount of %'s */
|
|
- {
|
|
- if (space)
|
|
- {
|
|
- *line++ = '%'; /* so simply add one */
|
|
- space -= 1;
|
|
- }
|
|
- else
|
|
- {
|
|
- *line++ = '\0'; /* remove the last one / terminate the string */
|
|
- }
|
|
-
|
|
- }
|
|
- }
|
|
+ /* Now that line_buff is no longer fed to *printf as format
|
|
+ * string, '%'s are no longer "dangerous".
|
|
+ */
|
|
break;
|
|
|
|
case PARSING_SYMSTART:
|