File 07_fix-formatstring.patch of Package scrot
Author: George Danchev <danchev@spnet.net>
Description: Prevent arbitrary long file names
--- a/src/options.c
+++ b/src/options.c
@@ -124,6 +124,12 @@
if (!opt.output_file)
{
opt.output_file = argv[optind++];
+
+ if ( strlen(opt.output_file) > 256 ) {
+ printf("output filename too long.\n");
+ exit(EXIT_FAILURE);
+ }
+
if (opt.thumb)
opt.thumb_file = name_thumbnail(opt.output_file);
}