Commit 702c4227 authored by Hanno Böck's avatar Hanno Böck Committed by Michael Natterer
Browse files

790783 - buffer overread in XCF parser if version field...

...has no null terminator

Check for the presence of '\0' before using atoi() on the version
string. Patch slightly modified (mitch).
parent f9125b51
......@@ -293,7 +293,8 @@ xcf_load_stream (Gimp *gimp,
{
info.file_version = 0;
}
else if (id[9] == 'v')
else if (id[9] == 'v' &&
id[13] == '\0')
{
info.file_version = atoi (id + 10);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment