diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-08-26 18:39:19 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-08-26 18:39:19 +0000 |
commit | 58115bd71f6053545a40a6e880af4cdfade55458 (patch) | |
tree | 679249015a7b66f0dfd5e75f9e9aad6789376ce5 /lib/libz/inflate.c | |
parent | 6df7b4baa77a61a4750e92d5e84a1e09ea70b0c4 (diff) |
Fix for DoS caused by incorrect error handling. From Dmitry V. Levin.
ok miller@ henning@
Diffstat (limited to 'lib/libz/inflate.c')
-rw-r--r-- | lib/libz/inflate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libz/inflate.c b/lib/libz/inflate.c index 27f87a69c95..549525a4625 100644 --- a/lib/libz/inflate.c +++ b/lib/libz/inflate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inflate.c,v 1.6 2003/12/17 00:28:19 millert Exp $ */ +/* $OpenBSD: inflate.c,v 1.7 2004/08/26 18:39:18 otto Exp $ */ /* inflate.c -- zlib decompression * Copyright (C) 1995-2003 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h @@ -910,6 +910,9 @@ int flush; } } + if (state->mode == BAD) + break; + /* build code tables */ state->next = state->codes; state->lencode = (code const FAR *)(state->next); |