1 From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-035
3 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
11 Bug-Reported-by: <romerox.adrian@gmail.com>
12 Bug-Reference-ID: <CABV5r3zhPXmSKUe9uedeGc5YFBM2njJ1iVmY2h5neWdQpDBQug@mail.gmail.com>
13 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-08/msg00045.html
17 A locale with a long name can trigger a buffer overflow and core dump. This
18 applies on systems that do not have locale_charset in libc, are not using
19 GNU libiconv, and are not using the libintl that ships with bash in lib/intl.
21 Patch (apply with `patch -p0'):
23 *** a/bash-4.3-patched/lib/sh/unicode.c 2014-01-30 16:47:19.000000000 -0500
24 --- b/lib/sh/unicode.c 2015-05-01 08:58:30.000000000 -0400
29 ! strcpy (charsetbuf, s+1);
30 t = strchr (charsetbuf, '@');
35 ! strncpy (charsetbuf, s+1, sizeof (charsetbuf) - 1);
36 ! charsetbuf[sizeof (charsetbuf) - 1] = '\0';
37 t = strchr (charsetbuf, '@');
43 ! strcpy (charsetbuf, locale);
49 ! strncpy (charsetbuf, locale, sizeof (charsetbuf) - 1);
50 ! charsetbuf[sizeof (charsetbuf) - 1] = '\0';
53 *** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500
54 --- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400
57 looks for to find the patch level (for the sccs version string). */
59 ! #define PATCHLEVEL 34
61 #endif /* _PATCHLEVEL_H_ */
63 looks for to find the patch level (for the sccs version string). */
65 ! #define PATCHLEVEL 35
67 #endif /* _PATCHLEVEL_H_ */