Mercurial > illumos > illumos-gate
changeset 13588:4df486ad9a31
1594 strxfrm may write past the specified buffer
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
author | Theo Schlossnagle <jesus@omniti.com> |
---|---|
date | Wed, 01 Feb 2012 19:59:23 -0800 |
parents | f7bc195459a4 |
children | 29b4b175ee0f |
files | usr/src/lib/libc/port/locale/collate.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/libc/port/locale/collate.c Wed Feb 01 11:05:52 2012 +0000 +++ b/usr/src/lib/libc/port/locale/collate.c Wed Feb 01 19:59:23 2012 -0800 @@ -588,9 +588,10 @@ if (room) { while (b) { b--; - if (room) + if (room) { *xf++ = buf[b]; - room--; + room--; + } } } need = want; @@ -613,9 +614,10 @@ while (b) { b--; - if (room) + if (room) { *xf++ = buf[b]; - room--; + room--; + } } } need = want;