changeset 37166:fe129ca366e4

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.
author Anton Ovchinnikov <revolver112@gmail.com>
date Wed, 04 Sep 2013 17:09:39 -0700
parents 46132d5e6afa
children 71c6a04a36da
files ChangeLog lib/regex-quote.c
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Sep 04 17:06:35 2013 -0600
+++ b/ChangeLog	Wed Sep 04 17:09:39 2013 -0700
@@ -1,3 +1,10 @@
+2013-09-04  Anton Ovchinnikov  <revolver112@gmail.com>  (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  <eblake@redhat.com>
 
 	glob: avoid -Wattribute warnings on glibc
--- a/lib/regex-quote.c	Wed Sep 04 17:06:35 2013 -0600
+++ b/lib/regex-quote.c	Wed Sep 04 17:09:39 2013 -0700
@@ -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)
     {