src/file_pdf.c: check ftell returned value for error code
This commit is contained in:
parent
b26e8bc161
commit
a87dd6095c
1 changed files with 5 additions and 0 deletions
|
@ -92,6 +92,11 @@ static void file_rename_pdf(const char *old_filename)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
offset=ftell(handle);
|
offset=ftell(handle);
|
||||||
|
if(offset < 0)
|
||||||
|
{
|
||||||
|
fclose(handle);
|
||||||
|
return;
|
||||||
|
}
|
||||||
offset=file_rsearch(handle, offset, pattern, sizeof(pattern));
|
offset=file_rsearch(handle, offset, pattern, sizeof(pattern));
|
||||||
if(offset==0)
|
if(offset==0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue