From: Chet Ramey Date: Tue, 19 May 2015 18:55:27 +0000 (-0400) Subject: Bash-4.3 patch 35 X-Git-Tag: bash-4.4~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e57a256f4ee0cefb0afc0e65bc3face6f9944b5b;p=thirdparty%2Fbash.git Bash-4.3 patch 35 --- diff --git a/lib/sh/unicode.c b/lib/sh/unicode.c index 9ee7147d7..798260ecd 100644 --- a/lib/sh/unicode.c +++ b/lib/sh/unicode.c @@ -78,13 +78,15 @@ stub_charset () s = strrchr (locale, '.'); if (s) { - strcpy (charsetbuf, s+1); + strncpy (charsetbuf, s+1, sizeof (charsetbuf) - 1); + charsetbuf[sizeof (charsetbuf) - 1] = '\0'; t = strchr (charsetbuf, '@'); if (t) *t = 0; return charsetbuf; } - strcpy (charsetbuf, locale); + strncpy (charsetbuf, locale, sizeof (charsetbuf) - 1); + charsetbuf[sizeof (charsetbuf) - 1] = '\0'; return charsetbuf; } #endif diff --git a/patchlevel.h b/patchlevel.h index db8e28c9e..f457723b1 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -25,6 +25,6 @@ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh looks for to find the patch level (for the sccs version string). */ -#define PATCHLEVEL 34 +#define PATCHLEVEL 35 #endif /* _PATCHLEVEL_H_ */