# HG changeset patch # User Theo Schlossnagle # Date 1328155163 28800 # Node ID 4df486ad9a31cf493f956a6f01da7da70a8885cd # Parent f7bc195459a4fe3f4ac428f99bd70e68b5b6837f 1594 strxfrm may write past the specified buffer Reviewed by: Garrett D'Amore Reviewed by: Richard Lowe Reviewed by: Adam Leventhal Reviewed by: Dan McDonald Approved by: Garrett D'Amore diff -r f7bc195459a4 -r 4df486ad9a31 usr/src/lib/libc/port/locale/collate.c --- 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;