diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-04-07 13:57:46 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-04-07 13:57:46 +0200 |
commit | 7db6ffbce3e2a709e77ff05782f703ec112ed84b (patch) | |
tree | 1f72a9fcef55fab0c5bf8c7b8b7f89c8feea7afc | |
parent | 2cd132eebb84dbcffcf0c20b9354c14f797c29cd (diff) | |
download | rsyslog-7db6ffbce3e2a709e77ff05782f703ec112ed84b.tar.gz rsyslog-7db6ffbce3e2a709e77ff05782f703ec112ed84b.tar.xz rsyslog-7db6ffbce3e2a709e77ff05782f703ec112ed84b.zip |
bugfix: the T/P/E config size specifiers did not work properly under call 32-bit platforms
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | runtime/cfsysline.c | 8 |
2 files changed, 7 insertions, 3 deletions
@@ -8,6 +8,8 @@ message-induced off-by-one error (potential segfault) (see 4.6.2) The analysis has been completed and a better fix been crafted and integrated. +- bugfix: the T/P/E config size specifiers did not work properly under + all 32-bit platforms --------------------------------------------------------------------------- Version 4.6.3 [v4-stable] (rgerhards), 2010-03-?? - bugfix: local unix system log socket was deleted even when it was diff --git a/runtime/cfsysline.c b/runtime/cfsysline.c index 184c0d87..5df8e64c 100644 --- a/runtime/cfsysline.c +++ b/runtime/cfsysline.c @@ -217,9 +217,11 @@ static rsRetVal doGetSize(uchar **pp, rsRetVal (*pSetHdlr)(void*, uid_t), void * case 'K': i *= 1000; ++(*pp); break; case 'M': i *= 1000000; ++(*pp); break; case 'G': i *= 1000000000; ++(*pp); break; - case 'T': i *= 1000000000000; ++(*pp); break; /* tera */ - case 'P': i *= 1000000000000000; ++(*pp); break; /* peta */ - case 'E': i *= 1000000000000000000; ++(*pp); break; /* exa */ + /* we need to use the multiplication below because otherwise + * the compiler gets an error during constant parsing */ + case 'T': i *= (int64) 1000 * 1000000000; ++(*pp); break; /* tera */ + case 'P': i *= (int64) 1000000 * 1000000000; ++(*pp); break; /* peta */ + case 'E': i *= (int64) 1000000000 * 1000000000; ++(*pp); break; /* exa */ } /* done */ |