aboutsummaryrefslogtreecommitdiff
path: root/xs_url.h
diff options
context:
space:
mode:
authordefault <nobody@localhost>2025-02-04 16:10:52 +0100
committerdefault <nobody@localhost>2025-02-04 16:10:52 +0100
commita33cdf29070a7bd0e46fc1484c98508ca959c1fa (patch)
tree44dc3edbcc9eee5c972594d20b766467df0e7bbf /xs_url.h
parent6f2afe1ecb01ff3ff8d6f9e297ed02e0d42f8b93 (diff)
Another crash fix.
Diffstat (limited to 'xs_url.h')
-rw-r--r--xs_url.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/xs_url.h b/xs_url.h
index 81dd668..fd320a4 100644
--- a/xs_url.h
+++ b/xs_url.h
@@ -23,6 +23,9 @@ xs_str *xs_url_dec(const char *str)
if (sscanf(str + 1, "%02x", &i) == 1) {
unsigned char uc = i;
+ if (!xs_is_string((char *)&uc))
+ break;
+
s = xs_append_m(s, (char *)&uc, 1);
str += 2;
}