aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2025-01-13 20:09:05 +0100
committerLuca Deri <deri@ntop.org>2025-01-13 20:09:05 +0100
commit129955ba2974edb7fb6dc5ab05e97fe82c514ec6 (patch)
treec77ce4170336c5d308d01f682ad44974c90afa6d
parent1a1fa63ddae91fd9bb1c18b233aa6ad9b3b65003 (diff)
Fixes https://github.com/ntop/nDPI/issues/2673
-rw-r--r--src/lib/ndpi_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c
index ddc20b196..f71013793 100644
--- a/src/lib/ndpi_utils.c
+++ b/src/lib/ndpi_utils.c
@@ -1848,7 +1848,7 @@ static int ndpi_url_decode(const char *s, char *out) {
if(c == '+') c = ' ';
else if(c == '%' && (!ishex(*s++)||
!ishex(*s++)||
- !sscanf(s - 2, "%2x", (unsigned int*)&c)))
+ (sscanf(s - 2, "%2x", (unsigned int*)&c) != 1)))
return(-1);
if(out) *o = c;