Mercurial > illumos > illumos-gate
changeset 13299:ad3f52808747
781 overrun in fgetws
Reviewed by: Garrett D'Amore <garrett@nexenta.com>
Reviewed by: Gordon Ross <gwr@nexenta.com>
Approved by: Garrett D'Amore <garrett@nexenta.com>
author | Bryan Cantrill <bryancantrill@gmail.com> |
---|---|
date | Wed, 09 Mar 2011 09:02:25 -0800 |
parents | c234f438c0d3 |
children | 3ce8381e1103 |
files | usr/src/lib/libc/port/locale/fgetws.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/libc/port/locale/fgetws.c Tue Mar 08 16:39:19 2011 -0500 +++ b/usr/src/lib/libc/port/locale/fgetws.c Wed Mar 09 09:02:25 2011 -0800 @@ -1,5 +1,5 @@ /* - * Copyright 2010 Nexenta Systems, Inc. All rights reserved. + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2002-2004 Tim J. Robbins. * All rights reserved. * @@ -63,7 +63,7 @@ } wsp = ws; - while (n--) { + while (--n) { wc = _fgetwc_unlocked(fp); if (wc == EOF) { /*