[syslog-ng] trailing spaces on udp messages (now with NULLs!)

Paul Krizak paul.krizak at amd.com
Sat Jan 20 00:36:00 CET 2007


Your patch appears to fix the problem.  Thanks!

Paul Krizak                         5900 E. Ben White Blvd. MS 625
Advanced Micro Devices              Austin, TX  78741
Linux/Unix Systems Engineering      Phone: (512) 602-8775
Silicon Design Division             Cell:  (512) 791-0686


Balazs Scheidler wrote:
> On Fri, 2007-01-19 at 11:28 -0600, Paul Krizak wrote:
>> It appears that the changes to logreader.c between rc1 and rc2 are what 
>> broke it.  Unfortunately this is where my debugging prowess ends, and 
>> hopefully Balazs picks up.
>>
>> FYI, copying logreader.c from the 2.0rc1 release into the 2.0.1 release 
>> compiles and works fine, and will be my holdover solution until 2.0.2 is 
>> released with the appropriate fix.
> 
> Can you check if the patch below fixes it? It does for me. (I've also
> committed the fix, so it should be included in tomorrow's snapshot)
> 
> --- orig/src/logmsg.c
> +++ mod/src/logmsg.c
> @@ -134,6 +134,9 @@ log_msg_parse(LogMessage *self, gchar *d
>    char *oldsrc;
>    int oldleft, stamp_length;
>    
> +  while (length > 0 && (data[length - 1] == '\n' || data[length - 1] == '\0'))
> +    length--;
> +  
>    if (flags & LP_NOPARSE)
>      {
>        g_string_assign_len(self->msg, data, length);
> 
> 
> 
> 
> 




More information about the syslog-ng mailing list