Hello.

rsyslog fails to convert numbers to strings:

set $.cnt14 = cstr( 123456789 );

{ "cnt14": "13579" }


This is due to a bug in libestr, see patch.


--
Pavel Levshin


diff -ur libestr-0.1.8/src/string.c libestr-0.1.8-patch/src/string.c
--- libestr-0.1.8/src/string.c  2013-10-16 19:02:38.000000000 +0400
+++ libestr-0.1.8-patch/src/string.c    2013-10-26 02:10:25.438286728 +0400
@@ -164,7 +164,7 @@
        /* now create the actual string */
        if((s = es_newStr(i)) == NULL) goto done;
        s->lenStr = i;
-       for(j = 0 ; --i >= 0 ; ++j, --i) {
+       for(j = 0 ; --i >= 0 ; ++j) {
                es_getBufAddr(s)[j] = numbuf[i];
        }
 
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to