# HG changeset patch # User Anton Ovchinnikov # Date 1378339779 25200 # Node ID 3f6cda9d617f8475d27e5b04c36888422f8d5e6f # Parent a226f0d99b73207947f1bb1e83e6c081094d7dc4 regex-quote: fix buffer access out of bounds http://lists.gnu.org/archive/html/bug-gnulib/2013-09/msg00001.html * lib/regex-quote.c (regex_quote_spec_pcre): Fix typo that resulted in an out-of-bounds read. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-09-04 Anton Ovchinnikov (tiny change) + + regex-quote: fix buffer access out of bounds + http://lists.gnu.org/archive/html/bug-gnulib/2013-09/msg00001.html + * lib/regex-quote.c (regex_quote_spec_pcre): + Fix typo that resulted in an out-of-bounds read. + 2013-09-04 Eric Blake glob: avoid -Wattribute warnings on glibc diff --git a/lib/regex-quote.c b/lib/regex-quote.c --- a/lib/regex-quote.c +++ b/lib/regex-quote.c @@ -104,7 +104,7 @@ char *p; p = result.special; - memcpy (p, bre_special, sizeof (pcre_special) - 1); + memcpy (p, pcre_special, sizeof (pcre_special) - 1); p += sizeof (pcre_special) - 1; if (options & PCRE_EXTENDED) {