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:38:55 +09:00
committed by GitHub
parent eb087e80e7
commit 247cb388a0

View File

@@ -480,8 +480,9 @@ static char *cj_unescape_string(const char *p, const char *str_end,
break;
}
default:
*dst++ = (char)esc;
break;
/* Unknown escape sequence is invalid in JSON */
free(out);
return NULL;
}
} else if (c < 0x20u) {
++p; /* skip invalid control char */