Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Syoyo Fujita
2026-03-19 02:39:13 +09:00
committed by GitHub
parent 247cb388a0
commit 0ab7e74933

View File

@@ -485,7 +485,9 @@ static char *cj_unescape_string(const char *p, const char *str_end,
return NULL;
}
} else if (c < 0x20u) {
++p; /* skip invalid control char */
/* Invalid unescaped control character in JSON string: treat as error */
free(out);
return NULL;
} else {
/* Should not be reached since scan_str stops here only for
special chars - but guard just in case */