Skip to content

Commit

Permalink
Explicit check for negative positions in PHYSFS_seek().
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 23, 2001
1 parent 1bed4ab commit 2ea6fee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions physfs.c
Expand Up @@ -1281,6 +1281,7 @@ int PHYSFS_seek(PHYSFS_file *handle, int pos)
assert(h != NULL);
assert(h->funcs != NULL);
BAIL_IF_MACRO(h->funcs->seek == NULL, ERR_NOT_SUPPORTED, 0);
BAIL_IF_MACRO(pos < 0, ERR_INVALID_ARGUMENT, 0);
return(h->funcs->seek(h, pos));
} /* PHYSFS_seek */

Expand Down

0 comments on commit 2ea6fee

Please sign in to comment.