aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cursor/xcursor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cursor/xcursor.c b/cursor/xcursor.c
index f7156cd..6e54cdb 100644
--- a/cursor/xcursor.c
+++ b/cursor/xcursor.c
@@ -259,6 +259,8 @@ xcursor_read_file_header(FILE *file)
return NULL;
if (!xcursor_read_uint(file, &head.ntoc))
return NULL;
+ if (head.header < XCURSOR_FILE_HEADER_LEN)
+ return NULL;
skip = head.header - XCURSOR_FILE_HEADER_LEN;
if (skip)
if (fseek(file, skip, SEEK_CUR) == EOF)