123456789101112131415161718192021 |
- Description: Prevent arbitrary long file names
- Author: George Danchev <danchev@spnet.net>
- Last-Update: 2009-10-25
- Index: scrot-0.8/src/options.c
- ===================================================================
- --- scrot-0.8.orig/src/options.c
- +++ scrot-0.8/src/options.c
- @@ -124,6 +124,12 @@ scrot_parse_option_array(int argc, char
- 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);
- }
|