提交 da5a0e87 编写于 作者: D Dr. Stephen Henson

Add error checking to avoid crashing when zlib cannot be loaded.

上级 200fc028
......@@ -397,13 +397,18 @@ COMP_METHOD *COMP_zlib(void)
p_deflateInit_
= (deflateInit__ft) DSO_bind_func(zlib_dso,
"deflateInit_");
zlib_loaded++;
if (p_compress && p_inflateEnd && p_inflate
&& p_inflateInit_ && p_deflateEnd
&& p_deflate && p_deflateInit_)
zlib_loaded++;
}
}
#endif
#if defined(ZLIB) || defined(ZLIB_SHARED)
meth = &zlib_stateful_method;
if (zlib_loaded)
meth = &zlib_stateful_method;
#endif
return(meth);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册