[Zlib-devel] [PATCH] Fix segfault when NULL is passed as path to gzopen*
Ozgur Murat Homurlu
ozgurmurath at gmail.com
Thu Dec 16 03:26:53 EST 2010
Hi,
In my opinion, it's a better practice to return error instead of
segfaulting, but this seems to be debatable. At least we can say that
extra check doesn't cause any significant resource loss in this
situation (unlike e.g. strlen which may be called in loops frequently)
. Also, open doesn't segfault when path is passed as NULL (this
doesn't seem to be in standard, so there may be implementations which
do) .
Özgür
More information about the Zlib-devel
mailing list