summaryrefslogtreecommitdiffstats
path: root/cfsysline.c
diff options
context:
space:
mode:
authorRB <aoz.syn@gmail.com>2008-09-01 16:40:24 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-09-01 16:40:24 +0200
commit8cba42c16a0d1d9ff9357379645e7c96ff9cef13 (patch)
tree9c909b3013f8f022ed4f0350d8c4dfc4bf6a0ae6 /cfsysline.c
parent6cbc5652ddee825899d1126ddef51f6f8bfa6467 (diff)
downloadrsyslog-8cba42c16a0d1d9ff9357379645e7c96ff9cef13.tar.gz
rsyslog-8cba42c16a0d1d9ff9357379645e7c96ff9cef13.tar.xz
rsyslog-8cba42c16a0d1d9ff9357379645e7c96ff9cef13.zip
bugfix: order-of magnitude issue with base-10 size definitions in config file parser.
Could lead to invalid sizes, constraints etc for e.g. queue files and any other object whose size was specified in base-10 entities. Did not apply to binary entities. Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
Diffstat (limited to 'cfsysline.c')
-rw-r--r--cfsysline.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cfsysline.c b/cfsysline.c
index d3203ccc..cf8e087a 100644
--- a/cfsysline.c
+++ b/cfsysline.c
@@ -213,11 +213,11 @@ static rsRetVal doGetSize(uchar **pp, rsRetVal (*pSetHdlr)(void*, uid_t), void *
case 'e': i *= (int64) 1024 * 1024 * 1024 * 1024 * 1024 * 1024; ++(*pp); break; /* exa */
/* and now the "new" 1000-based definitions */
case 'K': i *= 1000; ++(*pp); break;
- case 'M': i *= 10000; ++(*pp); break;
- case 'G': i *= 100000; ++(*pp); break;
- case 'T': i *= 1000000; ++(*pp); break; /* tera */
- case 'P': i *= 10000000; ++(*pp); break; /* peta */
- case 'E': i *= 100000000; ++(*pp); break; /* exa */
+ 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 */
}
/* done */