]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util: fix trailing char check with ByteExtractString
authorShivani Bhardwaj <shivanib134@gmail.com>
Tue, 21 Jul 2020 07:58:06 +0000 (13:28 +0530)
committerVictor Julien <victor@inliniac.net>
Tue, 21 Jul 2020 14:50:26 +0000 (16:50 +0200)
src/util-byte.c

index 76ee47dc2396d22bee33267bff7918f0faa1504b..4de066c8d3ac13c4b2b13566a11c934cd7f5988f 100644 (file)
@@ -223,7 +223,7 @@ int ByteExtractString(uint64_t *res, int base, uint16_t len, const char *str, bo
         SCLogDebug("invalid numeric value");
         return -1;
     }
-    else if (strict && len && *endptr != '\0') {
+    else if (strict && *endptr != '\0') {
         SCLogError(SC_ERR_INVALID_NUMERIC_VALUE, "Extra characters following numeric value");
         return -1;
     }