kuno / GeoIP

GeoIP binding for nodejs(>=0.10) and iojs
GNU Lesser General Public License v2.1
414 stars 129 forks source link

core dump when invalid data file supplied #71

Open chengen opened 10 years ago

chengen commented 10 years ago

hi guys, this problem may be not a big deal. it seems this module don't check the format of the data file. when supply with a invalid data file, it report nothing when initiate but will cause core dump when issue an ip lookup.

kuno commented 10 years ago

@chengen

I have some kind of validation mechanism inside the code, this should not be happened.

Before loading the db file, it will always to check if the type of the db file was matched with the module itself.

kuno commented 10 years ago

Its strange, it seems the check function think any file as type country, need further investigation.

Thanks.