From: Bruno Haible Date: Sat, 30 Sep 2017 11:42:24 +0000 (+0200) Subject: Fix an out-of-bounds memory read. X-Git-Tag: v0.20~446 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b05d13f04990f6ed74637ee8bdb42fd1500974ac;p=thirdparty%2Fgettext.git Fix an out-of-bounds memory read. Reported by Jakub Wilk . * gnulib-local/lib/term-ostream.oo.c (term_ostream_create): Pass the correct length to memcmp(). --- diff --git a/gnulib-local/lib/term-ostream.oo.c b/gnulib-local/lib/term-ostream.oo.c index 165fc33ea..84d04eb66 100644 --- a/gnulib-local/lib/term-ostream.oo.c +++ b/gnulib-local/lib/term-ostream.oo.c @@ -1877,7 +1877,7 @@ term_ostream_create (int fd, const char *filename) && (/* Recognize xterm-16color, xterm-88color, xterm-256color. */ (strlen (term) >= 5 && memcmp (term, "xterm", 5) == 0) || /* Recognize rxvt-16color. */ - (strlen (term) >= 4 && memcmp (term, "rxvt", 7) == 0) + (strlen (term) >= 4 && memcmp (term, "rxvt", 4) == 0) || /* Recognize konsole-16color. */ (strlen (term) >= 7 && memcmp (term, "konsole", 7) == 0)) ? (stream->max_colors == 256 ? cm_xterm256 :