* [patch] PR55982 Fix buglet in __strncat_chk
@ 2013-01-15 0:57 Paul Pluzhnikov
2013-01-15 7:44 ` Jakub Jelinek
0 siblings, 1 reply; 2+ messages in thread
From: Paul Pluzhnikov @ 2013-01-15 0:57 UTC (permalink / raw)
To: gcc-patches; +Cc: jakub, ppluzhnikov
Greetings,
In libssp/strncat-chk.c, the loop was unrolled 5 times (apparently by
accident).
Ok for trunk?
Thanks,
--
Paul Pluzhnikov
2013-01-14 Paul Pluzhnikov <ppluzhnikov@google.com>
PR 55982
* strncat-chk.c (__strncat_chk): Fix loop unroll.
Index: libssp/strncat-chk.c
===================================================================
--- libssp/strncat-chk.c (revision 195181)
+++ libssp/strncat-chk.c (working copy)
@@ -87,12 +87,6 @@ __strncat_chk (char *__restrict__ dest, const char
*++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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] PR55982 Fix buglet in __strncat_chk
2013-01-15 0:57 [patch] PR55982 Fix buglet in __strncat_chk Paul Pluzhnikov
@ 2013-01-15 7:44 ` Jakub Jelinek
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2013-01-15 7:44 UTC (permalink / raw)
To: Paul Pluzhnikov; +Cc: gcc-patches
On Mon, Jan 14, 2013 at 04:57:42PM -0800, Paul Pluzhnikov wrote:
> In libssp/strncat-chk.c, the loop was unrolled 5 times (apparently by
> accident).
> 2013-01-14 Paul Pluzhnikov <ppluzhnikov@google.com>
>
> PR 55982
> * strncat-chk.c (__strncat_chk): Fix loop unroll.
Ok.
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-15 7:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-15 0:57 [patch] PR55982 Fix buglet in __strncat_chk Paul Pluzhnikov
2013-01-15 7:44 ` Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).