]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-4.3 patch 35
authorChet Ramey <chet.ramey@case.edu>
Tue, 19 May 2015 18:55:27 +0000 (14:55 -0400)
committerChet Ramey <chet.ramey@case.edu>
Tue, 19 May 2015 18:55:27 +0000 (14:55 -0400)
lib/sh/unicode.c
patchlevel.h

index 9ee7147d7e33705ba2cb41dd062c7e7b8285abdc..798260ecdeae03259db3a5eed3ba6294237e5c7b 100644 (file)
@@ -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
index db8e28c9ed6e3e50abe4b3f68fb58b3cb71c5c88..f457723b14aa7f1616800cffc05ce501206f8b41 100644 (file)
@@ -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_ */