Commit f9a681ac authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Fix possible negative offset to fseeko()

CID 350353
parent c920d0da
Pipeline #2826 passed with stage
in 9 minutes and 29 seconds
...@@ -3595,6 +3595,8 @@ bool getzpt(FILE* stream, fmsghdr_t* hdr) ...@@ -3595,6 +3595,8 @@ bool getzpt(FILE* stream, fmsghdr_t* hdr)
bool intl_found = false; bool intl_found = false;
pos=ftello(stream); pos=ftello(stream);
if(pos < 0)
return false;
len=fread(buf,1,0x1000,stream); len=fread(buf,1,0x1000,stream);
for(i=0;i<len;i++) { for(i=0;i<len;i++) {
if(buf[i]=='\n') /* ignore line-feeds */ if(buf[i]=='\n') /* ignore line-feeds */
......
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