-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:Fedora 17, pymongo 2.1.1
I just tried loading an invalid BSON document using the bson module from pymongo. I would expect this to throw an exception, not segfault. (I'm aware that validation isn't used, but I think that is a separate issue from segfaulting, which is almost never acceptable).
[christian@chergert-x1 sandbox]$ python
Python 2.7.3 (default, Apr 30 2012, 21:18:11)
[GCC 4.7.0 20120416 (Red Hat 4.7.0-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymongo
>>> pymongo.version
'2.1.1'
>>> import bson
>>> d = '\x00' * 20000000
>>> b = bson.BSON(d)
>>> b.decode()
Segmentation fault