summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libkmod/libkmod-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c
index 2136a96..0c49868 100644
--- a/libkmod/libkmod-index.c
+++ b/libkmod/libkmod-index.c
@@ -126,7 +126,7 @@ static uint32_t read_long(FILE *in)
uint32_t l;
errno = 0;
- if (fread(&l, sizeof(uint32_t), 1, in) <= 0)
+ if (fread(&l, sizeof(uint32_t), 1, in) != sizeof(uint32_t))
read_error();
return ntohl(l);
}