Procházet zdrojové kódy

Another crash fix.

default před 1 rokem
rodič
revize
a33cdf2907
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      xs_url.h

+ 3 - 0
xs_url.h

@@ -23,6 +23,9 @@ xs_str *xs_url_dec(const char *str)
             if (sscanf(str + 1, "%02x", &i) == 1) {
             if (sscanf(str + 1, "%02x", &i) == 1) {
                 unsigned char uc = i;
                 unsigned char uc = i;
 
 
+                if (!xs_is_string((char *)&uc))
+                    break;
+
                 s = xs_append_m(s, (char *)&uc, 1);
                 s = xs_append_m(s, (char *)&uc, 1);
                 str += 2;
                 str += 2;
             }
             }