From: Shivani Bhardwaj Date: Tue, 21 Jul 2020 07:58:06 +0000 (+0530) Subject: util: fix trailing char check with ByteExtractString X-Git-Tag: suricata-6.0.0-beta1~119 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6f84515dd92502577f884dca3c4417c931ae4a16;p=thirdparty%2Fsuricata.git util: fix trailing char check with ByteExtractString --- diff --git a/src/util-byte.c b/src/util-byte.c index 76ee47dc23..4de066c8d3 100644 --- a/src/util-byte.c +++ b/src/util-byte.c @@ -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; }