From 2ea6feeb2b5037c1446f834e44453444f695774b Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 23 Jul 2001 07:15:21 +0000 Subject: [PATCH] Explicit check for negative positions in PHYSFS_seek(). --- physfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/physfs.c b/physfs.c index 1944a9d5..1f8a7e2a 100644 --- a/physfs.c +++ b/physfs.c @@ -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 */