All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Remove pointless check in zlib
@ 2004-09-01 15:51 Dave Jones
  0 siblings, 0 replies; only message in thread
From: Dave Jones @ 2004-09-01 15:51 UTC (permalink / raw)
  To: linux-kernel

We dereference 'z' a few lines above this check.
If it was possible to hit this condition, it wouldve
triggered long ago, in the form of a crash.

Spotted with the source checker from Coverity.com.

Signed-off-by: Dave Jones <davej@redhat.com>


diff -urpN --exclude-from=/home/davej/.exclude bk-linus/lib/zlib_inflate/inflate.c linux-2.6/lib/zlib_inflate/inflate.c
--- bk-linus/lib/zlib_inflate/inflate.c	2004-06-03 13:40:26.000000000 +0100
+++ linux-2.6/lib/zlib_inflate/inflate.c	2004-06-03 13:42:54.000000000 +0100
@@ -53,8 +53,6 @@ int zlib_inflateInit2_(
       return Z_VERSION_ERROR;
 
   /* initialize state */
-  if (z == NULL)
-    return Z_STREAM_ERROR;
   z->msg = NULL;
   z->state = &WS(z)->internal_state;
   z->state->blocks = NULL;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-01 17:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-01 15:51 [PATCH] Remove pointless check in zlib Dave Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.