Explicit check for negative positions in PHYSFS_seek().
authorRyan C. Gordon <icculus@icculus.org>
Mon, 23 Jul 2001 07:15:21 +0000
changeset 48 113df08e5fee
parent 47 fbf5d37147eb
child 49 5e6d33615d30
Explicit check for negative positions in PHYSFS_seek().
physfs.c
--- a/physfs.c	Mon Jul 23 04:48:04 2001 +0000
+++ b/physfs.c	Mon Jul 23 07:15:21 2001 +0000
@@ -1281,6 +1281,7 @@
     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 */