diff options
-rw-r--r-- | libkmod/libkmod-index.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c index aa17c2f..1f3351a 100644 --- a/libkmod/libkmod-index.c +++ b/libkmod/libkmod-index.c @@ -242,7 +242,8 @@ static struct index_node_f *index_read(FILE *in, uint32_t offset) if ((offset & INDEX_NODE_MASK) == 0) return NULL; - fseek(in, offset & INDEX_NODE_MASK, SEEK_SET); + if (fseek(in, offset & INDEX_NODE_MASK, SEEK_SET) < 0) + return NULL; if (offset & INDEX_NODE_PREFIX) { struct strbuf buf; |