-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:linux x86-64
- The following crashes the bson parser of Pymongo 2.6+ (github master
- as of Thu Sep 19 16:07:21 PDT 2013). It's invalid bson because I'm
- trying to find valid bson strings in a corrupted customer file
- (not corrupted by us). Any help would be appreciated. I tried
- opening a ticket through MMS, but it repeatedly says
- "Yikes! Server error. Please try again in a minute." Note: earlier version
- 2.5.2 crashed even sooner. Any help would be appreciated.
import bson
charlist = [129, 1, 0, 0, 15, 3, 97, 117, 116, 104, 111, 114, 0, 98,
0, 0, 0, 7, 95, 105, 100, 0, 81, 18, 253, 174, 199, 49, 179, 129, 106,
0, 1, 57, 2, 102, 105, 114, 115, 116, 110, 97, 109, 101, 0, 7, 0, 0,
0, 66, 97, 105, 108, 101, 101, 0, 2, 108, 97, 115, 116, 110, 97, 109,
101, 0, 10, 0, 0, 0, 69, 100, 103, 105, 110, 103, 116, 111, 110, 0, 2,
101, 109, 97, 105, 108, 0, 19, 0, 0, 0, 101, 100, 103, 105, 110, 103,
116, 111, 110, 46, 98, 64, 109, 101, 46, 99, 111, 109, 0, 0, 3, 100,
97, 116, 101, 115, 0, 39, 0, 0, 0, 1, 99, 114, 101, 97, 116, 105, 111,
110, 0, 0, 112, 187, 113, 35, 213, 115, 66, 1, 117, 112, 100, 97, 116,
101, 0, 0, 112, 187, 113, 35, 213, 115, 66, 0, 16, 112, 97, 103, 101,
99, 111, 117, 110, 116, 0, 7, 0, 0, 0, 4, 112, 97, 103, 101, 115, 0,
154, 10, 0, 0, 3, 48, 0, 120, 0, 0, 0, 2, 116, 101, 109, 112, 108, 97,
116, 101, 0, 14, 0, 0, 0, 103, 101, 110, 101, 114, 105, 99, 95, 99,
111, 118, 101, 114, 0, 4, 116, 97, 103, 115, 0, 18, 0, 0, 0, 2, 48, 0,
6, 0, 0, 0, 99, 111, 118, 101, 114, 0, 0, 7, 95, 105, 100, 0, 81, 59,
245, 136, 203, 150, 133, 129, 1, 0, 0, 16, 3, 100, 97, 116, 101, 115,
0, 39, 0, 0, 0, 1, 99, 114, 101, 97, 116, 105, 111, 110, 0, 0, 0, 191,
113, 35, 213, 115, 66, 1, 117, 112, 100, 97, 116, 101, 0, 0, 0, 191,
113, 35, 213, 115, 66, 0, 0, 3, 49, 0, 162, 0, 0, 0, 3, 109, 101, 116,
97, 0, 23, 0, 0, 0, 2, 100, 101, 115, 99, 114, 105, 112, 116, 105,
111, 110, 0, 1, 0, 0, 0, 0, 0, 2, 116, 101, 109, 112, 108, 97, 116,
101, 0, 13, 0, 0, 0, 103, 101, 110, 101, 114, 105, 99, 95, 108, 105,
115, 116, 0, 4, 116, 97, 103, 115, 0, 32, 0, 0, 0, 2, 48, 0, 8, 0, 0]
malformed_bson_string = str(bytearray(charlist))
print malformed_bson_string
print bson.BSON(malformed_bson_string).decode()
- above crashes with core dump.