summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorBryan Cantrill <bryancantrill@gmail.com>2011-03-09 09:02:25 -0800
committerBryan Cantrill <bryancantrill@gmail.com>2011-03-09 09:02:25 -0800
commit45bed6684dba85b27aec0314b1480daae9c7835c (patch)
treeafdbc436437a24030c57300f5389dd7f9ee590b4 /usr/src
parent3f2366c2bb65e49f1b5900001844588089a7d7c4 (diff)
downloadillumos-gate-45bed6684dba85b27aec0314b1480daae9c7835c.tar.gz
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>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/libc/port/locale/fgetws.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/src/lib/libc/port/locale/fgetws.c b/usr/src/lib/libc/port/locale/fgetws.c
index e209023141..11340600ab 100644
--- a/usr/src/lib/libc/port/locale/fgetws.c
+++ b/usr/src/lib/libc/port/locale/fgetws.c
@@ -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 @@ _fgetws_impl(wchar_t *_RESTRICT_KYWD ws, int n, FILE *_RESTRICT_KYWD fp,
}
wsp = ws;
- while (n--) {
+ while (--n) {
wc = _fgetwc_unlocked(fp);
if (wc == EOF) {
/*