[PATCH] check return value of fetch_block (Coverity)

Marcus Meissner marcus at jet.franken.de
Tue Feb 19 15:46:04 CST 2008


Hi,

Coverity seems not to show it anymore, but it is still there.
hdr can be NULL.

Ciao, Marcus
---
 tools/winedump/lnk.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/winedump/lnk.c b/tools/winedump/lnk.c
index 53d2a55..de1e95a 100644
--- a/tools/winedump/lnk.c
+++ b/tools/winedump/lnk.c
@@ -425,6 +425,8 @@ void lnk_dump(void)
 
     offset = 0;
     hdr = fetch_block();
+    if (!hdr)
+        return;
 
     printf("Header\n");
     printf("------\n\n");
-- 
1.5.2.4



More information about the wine-patches mailing list