Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pcre2posix: fix crash on recent regerror code
Since 0710ce2 (pcre2posix: avoid snprintf quirks in regerror (#333), 2023-11-15), a call for snprintf was replaced by a pair of strncpy and buf[errbuf_size - 1] = 0, but it didn't account for the case where errbuf_size == 0. Make the code conditional to mimic the original logic and avoid crashing.
- Loading branch information