FLIF icon indicating copy to clipboard operation
FLIF copied to clipboard

Found a code security issue in function “encode_load_input_images”

Open xiaolian8325 opened this issue 5 years ago • 0 comments

hi,

issue

the function snprintf use an external and controllable argument like argv[0], that is very dangerous. Because the argument is just a format string, it contains some symbols as %n %p %s are very dangerous. The user can read or write the stack segment by using them.

code

             snprintf(filename,maxlength,argv[0],framecounter);
             if (!file_exists(filename)) {
                stop_searching++;
                continue;
             }

example

use the command ./flif -e sig%s.%s.png test.flif the error will be Segmentation fault

thanks for your time.

from: Eagleye team Cheng Renfeng. Zhou Kai. Cheng Xiaoyan.

xiaolian8325 avatar Jul 08 '19 07:07 xiaolian8325