don't allow signs for date strings (always expect full years)

Tue, 13 Oct 2015 16:10:58 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 13 Oct 2015 16:10:58 +0200
changeset 161
97a52ce52b1a
parent 160
ba8f1691c0ee
child 162
25374afa5616

don't allow signs for date strings (always expect full years)

libidav/utils.c file | annotate | diff | comparison | revisions
--- a/libidav/utils.c	Tue Oct 13 15:54:31 2015 +0200
+++ b/libidav/utils.c	Tue Oct 13 16:10:58 2015 +0200
@@ -74,8 +74,8 @@
         str++;
     }
 
-    // ensure we have numeric values (maybe with sign)
-    if(!isdigit(*str) && *str != '-' && *str != '+') {
+    // ensure we have numeric values
+    if(!isdigit(*str)) {
         return 1;
     }
 
@@ -88,7 +88,7 @@
         str++;
         tparts.tm_mon = strtoul(str, &str, 10) - 1;
 
-        if (*str++ != '-') {
+        if(*str++ != '-') {
             return 1;
         }
 

mercurial