diff options
author | Leandro Pereira <leandro@hardinfo.org> | 2014-04-28 20:47:49 -0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2014-05-14 20:18:00 -0300 |
commit | b6d985c61aa8a267b6b6c26bb9d58626d97a7403 (patch) | |
tree | aaaad5f4510a4ab65afef6eace2455d9e77bb5d2 | |
parent | d36c886aed35491bf8e0e882eeae472f40f08eb7 (diff) | |
download | kmod-b6d985c61aa8a267b6b6c26bb9d58626d97a7403.tar.gz kmod-b6d985c61aa8a267b6b6c26bb9d58626d97a7403.tar.bz2 kmod-b6d985c61aa8a267b6b6c26bb9d58626d97a7403.zip |
Ensure read_long() reads the correct number of bytes from the index
-rw-r--r-- | libkmod/libkmod-index.c | 2 |
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); } |