More thorough use of O_BINARY.

This commit is contained in:
Markus F.X.J. Oberhumer
2016-10-07 15:04:12 +02:00
parent 42206364e5
commit ed900b0476
6 changed files with 14 additions and 9 deletions
+2 -2
View File
@@ -170,9 +170,9 @@ static void handle_allegropak(InputFile *fi, OutputFile *fo)
if (memcmp(buf, "slh+", 4) != 0)
return;
pfsize = get_be32_signed(buf+4);
if (pfsize <= 8 || (off_t) pfsize >= (off_t) fi->st.st_size)
if (pfsize <= 8 || pfsize >= (off_t) fi->st.st_size)
return;
fi->seek(-pfsize, SEEK_END);
fi->seek(-(off_t)pfsize, SEEK_END);
} catch (const IOException&) {
return;
}