Explorar o código

Fix: Add nullptr check

lessone1 hai 1 ano
pai
achega
170796ea70
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      src/wn_utils.c

+ 5 - 0
src/wn_utils.c

@@ -279,6 +279,11 @@ int urldecode(char *str, int len)
     int value;
     int c;
 
+    if (data == RT_NULL)
+    {
+        return 0;
+    }
+
     while (len--)
     {
         if (*data == '+')