PCRE2Project / pcre2

PCRE2 development is now based here.
Other
919 stars 191 forks source link

pcre2posix: avoid snprintf quirks in regerror #333

Closed carenas closed 1 year ago

carenas commented 1 year ago

Address some incorrect return values from pcre2_regerror() depending on the version of snprintf that it uses internally.

Isolates the snprintf calls to minimize its impact and does an unnecessary runtime detection under the assumption that calls to this code aren't performance sensitive.

Doing a proper configure time detection has been punted for now, since there is already several other places where the possibility of using a broken snprintf has already workarounds, that will likely also need to be changed.