aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2015-01-15 14:32:28 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2015-01-15 14:36:19 +0200
commitda045fc11d890e55b99b7cf842f7cb92dce532bb (patch)
tree9c42f3326624eb1683fc421e039c11bec4642c4e
parentbdd68868836f01ac766afa1a6c79a5f7d4287da6 (diff)
downloadeclat-da045fc11d890e55b99b7cf842f7cb92dce532bb.tar.gz
eclat-da045fc11d890e55b99b7cf842f7cb92dce532bb.tar.bz2
Bugfixes
* grecs: Upgrade * src/sg.c (add_source_cidr): Accept /0 mask; improve error detection.
m---------grecs0
-rw-r--r--src/sg.c3
2 files changed, 2 insertions, 1 deletions
diff --git a/grecs b/grecs
-Subproject 9c964ec8a4fe23fef993a1cf7f4563d0c32b68b
+Subproject be602072f517f841ee29a76f8119b030ec3d869
diff --git a/src/sg.c b/src/sg.c
index 68b261c..58249e1 100644
--- a/src/sg.c
+++ b/src/sg.c
@@ -61,9 +61,10 @@ add_source_cidr(char *str, int i)
char *q;
*p++ = 0;
+ errno = 0;
n = strtoul(p, &q, 10);
if (*q == 0) {
- if (n <= 0 || n > 32) {
+ if (errno || n > 32) {
p[-1] = '/';
die(EX_USAGE, "invalid network mask in %s",
str);

Return to:

Send suggestions and report system problems to the System administrator.