Merge "protect against NULL dump_folder[] value in ReadAnimatedImage()"

This commit is contained in:
Pascal Massimino 2017-08-29 05:41:16 +00:00 committed by Gerrit Code Review
commit f8bdc26821

View File

@ -152,6 +152,8 @@ static int DumpFrame(const char filename[], const char dump_folder[],
FILE* f = NULL;
const char* row;
if (dump_folder == NULL) dump_folder = ".";
base_name = strrchr(filename, '/');
base_name = (base_name == NULL) ? filename : base_name + 1;
max_len = strlen(dump_folder) + 1 + strlen(base_name)