diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-10 13:09:26 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-10 13:09:26 -0800 |
commit | b5562c9a55996735e219b154c1e0f19ec10ce67a (patch) | |
tree | 8bf5206f70ed428b22e6dd4541c46e7a549a438b /arch/x86/boot/compressed/mkpiggy.c | |
parent | bf98f77888c92fa3aeb28791ba3b5c30675076f3 (diff) | |
parent | 5471262290a6695b3300903267e0a2584f721000 (diff) |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, UV: Initialize the broadcast assist unit base destination node id properly
x86, numa: Fix numa_emulation code with memory-less node0
x86, build: Make sure mkpiggy fails on read error
Diffstat (limited to 'arch/x86/boot/compressed/mkpiggy.c')
-rw-r--r-- | arch/x86/boot/compressed/mkpiggy.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/boot/compressed/mkpiggy.c b/arch/x86/boot/compressed/mkpiggy.c index 646aa78ba5f..46a82388243 100644 --- a/arch/x86/boot/compressed/mkpiggy.c +++ b/arch/x86/boot/compressed/mkpiggy.c @@ -62,7 +62,12 @@ int main(int argc, char *argv[]) if (fseek(f, -4L, SEEK_END)) { perror(argv[1]); } - fread(&olen, sizeof olen, 1, f); + + if (fread(&olen, sizeof(olen), 1, f) != 1) { + perror(argv[1]); + return 1; + } + ilen = ftell(f); olen = getle32(&olen); fclose(f); |