projects
/
platform
/
upstream
/
kmod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d36c886
)
Ensure read_long() reads the correct number of bytes from the index
author
Leandro Pereira
<leandro@hardinfo.org>
Mon, 28 Apr 2014 23:47:49 +0000
(20:47 -0300)
committer
Lucas De Marchi
<lucas.demarchi@intel.com>
Wed, 14 May 2014 23:18:00 +0000
(20:18 -0300)
libkmod/libkmod-index.c
patch
|
blob
|
history
diff --git
a/libkmod/libkmod-index.c
b/libkmod/libkmod-index.c
index
2136a96
..
0c49868
100644
(file)
--- 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);
}