summaryrefslogtreecommitdiff
path: root/ext/pcre/pcrelib/pcreposix.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/pcrelib/pcreposix.c')
-rw-r--r--ext/pcre/pcrelib/pcreposix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pcre/pcrelib/pcreposix.c b/ext/pcre/pcrelib/pcreposix.c
index 31c7a31ab3..3cee2aa33f 100644
--- a/ext/pcre/pcrelib/pcreposix.c
+++ b/ext/pcre/pcrelib/pcreposix.c
@@ -158,7 +158,7 @@ addlength = (preg != NULL && (int)preg->re_erroffset != -1)?
if (errbuf_size > 0)
{
if (addlength > 0 && errbuf_size >= length + addlength)
- sprintf(errbuf, "%s%s%-6d", message, addmessage, (int)preg->re_erroffset);
+ snprintf(errbuf, errbuf_size, "%s%s%-6d", message, addmessage, (int)preg->re_erroffset);
else
{
strncpy(errbuf, message, errbuf_size - 1);