summaryrefslogtreecommitdiff
path: root/lib/libc/nls/catopen.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-05 12:32:34 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-05 12:32:34 +0000
commit34360872d1ea5a8d5fd1c54fee069e25dacb1d82 (patch)
tree767c8b55f7fa6f54eba7581cdd9a051ea18c0983 /lib/libc/nls/catopen.c
parent2b764e6298f12f3def9645b73946d1761f50bf52 (diff)
1 char oflow; bitblt & deraadt
Diffstat (limited to 'lib/libc/nls/catopen.c')
-rw-r--r--lib/libc/nls/catopen.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/nls/catopen.c b/lib/libc/nls/catopen.c
index 28dd2f69408..193250fc24e 100644
--- a/lib/libc/nls/catopen.c
+++ b/lib/libc/nls/catopen.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: catopen.c,v 1.6 1996/08/26 00:17:20 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: catopen.c,v 1.7 1996/09/05 12:32:33 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#define _NLS_PRIVATE
@@ -88,12 +88,12 @@ _catopen(name, oflag)
switch (*(++s)) {
case 'L': /* locale */
u = lang;
- while (*u && t < tmppath + PATH_MAX)
+ while (*u && t < tmppath + PATH_MAX-1)
*t++ = *u++;
break;
case 'N': /* name */
u = name;
- while (*u && t < tmppath + PATH_MAX)
+ while (*u && t < tmppath + PATH_MAX-1)
*t++ = *u++;
break;
case 'l': /* lang */
@@ -101,11 +101,11 @@ _catopen(name, oflag)
case 'c': /* codeset */
break;
default:
- if (t < tmppath + PATH_MAX)
+ if (t < tmppath + PATH_MAX-1)
*t++ = *s;
}
} else {
- if (t < tmppath + PATH_MAX)
+ if (t < tmppath + PATH_MAX-1)
*t++ = *s;
}
s++;