]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod-file: gracefully handle errors from zlib
authorDave Reisner <dreisner@archlinux.org>
Mon, 7 May 2012 23:41:41 +0000 (19:41 -0400)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 8 May 2012 13:22:13 +0000 (10:22 -0300)
commitc7d5a60d3df735a3816bbc1ff1b416a803a4f7a6
tree7e9f26e26d355a6b40460682e12889aa399a4e4e
parent4321590770cb5fb9e2756ca9289ba0fa0ee497ed
libkmod-file: gracefully handle errors from zlib

zlib won't necessarily set the system errno, and this is particularly
evident on corrupted data (which results in a double free). Use zlib's
gzerror to detect the failure, returning a generic EINVAL when zlib
doesn't provide us with an errno.
libkmod/libkmod-file.c