geoip: Error out if file is not inflated completely
commit2f43dee3a51eeb96746c0f27bba837b9e423788b
authorTobias Klauser <tklauser@distanz.ch>
Wed, 11 Nov 2015 13:46:00 +0000 (11 14:46 +0100)
committerTobias Klauser <tklauser@distanz.ch>
Wed, 11 Nov 2015 13:46:00 +0000 (11 14:46 +0100)
tree6bba5247514b0cfb1a5b86c567494bdf0cf4d071
parent240bb31fc01efd6d059afcd9884b29f6814be789
geoip: Error out if file is not inflated completely

In case the downloaded gzip file got corrupted somehow, the gzread would
fail, leaving part of the file uninflated and thus leading to a
corrupted GeoIP database. This can in the worst case lead to a crash in
libgeoip which in turn causes netsniff-ng/flowtop/astraceroute to crash.
So better panic() if we fail to uncompress.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
geoip.c