projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c20ad0d
)
BUG/MINOR: tools: Reject size format not starting by a digit
author
Christopher Faulet
<cfaulet@haproxy.com>
Fri, 11 Dec 2020 08:30:45 +0000
(09:30 +0100)
committer
Christopher Faulet
<cfaulet@haproxy.com>
Fri, 11 Dec 2020 11:01:07 +0000
(12:01 +0100)
parse_size_err() function is now more strict on the size format. The first
character must be a digit. Otherwise an error is returned. Thus "size k" is
now rejected.
This patch must be backported to all stable versions.
src/tools.c
patch
|
blob
|
history
diff --git
a/src/tools.c
b/src/tools.c
index
590a101
..
27e603a
100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-2304,6
+2304,9
@@
const char *parse_time_err(const char *text, unsigned *ret, unsigned unit_flags)
const char *parse_size_err(const char *text, unsigned *ret) {
unsigned value = 0;
+ if (!isdigit((unsigned char)*text))
+ return text;
+
while (1) {
unsigned int j;