re PR other/55982 (__strncat_chk is buggy)
authorPaul Pluzhnikov <ppluzhnikov@gcc.gnu.org>
Tue, 15 Jan 2013 16:02:42 +0000 (08:02 -0800)
committerPaul Pluzhnikov <ppluzhnikov@gcc.gnu.org>
Tue, 15 Jan 2013 16:02:42 +0000 (08:02 -0800)
2013-01-15  Paul Pluzhnikov  <ppluzhnikov@google.com>

PR 55982
* strncat-chk.c (__strncat_chk): Fix loop unroll.

From-SVN: r195207

libssp/ChangeLog
libssp/strncat-chk.c

index 64874e1c0037c3245a7c0bd38517bd710eab157f..294dfd5d26b805835a8c5bde2d5cc2f3066bdca7 100644 (file)
@@ -1,12 +1,17 @@
+2013-01-15  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+       PR 55982
+       * strncat-chk.c (__strncat_chk): Fix loop unroll.
+
 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
 
        * configure: Regenerated.
 
 2012-05-29  Benjamin Kosnik  <bkoz@redhat.com>
 
-        PR libstdc++/51007
-        * configure.ac: Allow gnu, gnu* variants for --enable-symvers argument.
-        * configure: Regenerated.
+       PR libstdc++/51007
+       * configure.ac: Allow gnu, gnu* variants for --enable-symvers argument.
+       * configure: Regenerated.
 
 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
 
index d8056e843360284c1216e34706c7bd5819a19585..6ab41ffbc68e3f72a0ea2887ac5b799ea342561e 100644 (file)
@@ -87,12 +87,6 @@ __strncat_chk (char *__restrict__ dest, const char *__restrict__ src,
           *++dest = c;
           if (c == '\0')
             return s;
-          if (slen-- == 0)
-            __chk_fail ();
-          c = *src++;
-          *++dest = c;
-          if (c == '\0')
-            return s;
         } while (--n4 > 0);
       n &= 3;
     }