Coverity CID 3206: Add assertion for NULL deref.

This commit is contained in:
christos 2006-05-13 22:05:04 +00:00
parent c5d3cabfdd
commit b7c6768d3d
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: inflate.c,v 1.2 2006/01/27 00:45:27 christos Exp $ */
/* $NetBSD: inflate.c,v 1.3 2006/05/13 22:05:04 christos Exp $ */
/* inflate.c -- zlib decompression
* Copyright (C) 1995-2005 Mark Adler
@ -687,6 +687,7 @@ int flush;
if (state->head != Z_NULL &&
state->head->extra != Z_NULL) {
len = state->head->extra_len - state->length;
Assert (next != NULL, "next is null");
zmemcpy(state->head->extra + len, next,
len + copy > state->head->extra_max ?
state->head->extra_max - len : copy);