Commit d3275f49 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

feh_printf: Fix buffer overflow when handling unknown format specifiers

parent 2cbfb7ee
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -10,6 +10,9 @@ git HEAD
      in it, and as I do not have the time to take over giblib development,
      importing the library seems to be the best solution.
    * Fix/improve --randomize for short filelists (closes #151)
    * Fix a buffer overflow in the printf implementation when handling unknown
      format specifiers (affects --action, --customlist, --index-info, --info,
      --thumb-title and --title)

Sun, 27 Apr 2014 20:28:02 +0200  Daniel Friesel <derf+feh@finalrewind.org>

+2 −1
Original line number Diff line number Diff line
@@ -584,6 +584,7 @@ char *feh_printf(char *str, feh_file * file, winwidget winwid)
				break;
			default:
				weprintf("Unrecognized format specifier %%%c", *c);
				if ((strlen(ret) + 3) < sizeof(ret))
					strncat(ret, c - 1, 2);
				break;
			}