installed via
cmake3 -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_BSON=ONLY -DCMAKE_BUILD_TYPE=Debug . cd src/libbson make make install
#include <stdio.h> #include <bson.h> static void test_binary(){ bson_t *b, *c; char *str; size_t len; b = bson_new (); const uint8_t binary[] = {0, 1, 2, 3, 4}; BSON_ASSERT (bson_append_binary (b, "binary", -1, BSON_SUBTYPE_BINARY, binary, sizeof binary)); str = bson_as_json (b, &len); //str = "{ \"binary\" : { \"$binary\" : \"AAECAwQ=\", \"$type\" : \"00\" } }" bson_error_t e; c = bson_new_from_json(str, len, &e); printf("%s\n", str); bson_free (str); bson_destroy (b); } int main (int argc, char *argv[]) { test_binary(); return 0; }
bson_new_from_json calls
bson_json_reader_read calls
jsonsl_feed calls
bson_b64_pton
segfaults on line
c = bson_new_from_json(str, len, &e);
- causes
-
CDRIVER-2695 Share threading config checks between libbson and libmongoc
- Closed
- is caused by
-
CDRIVER-2429 Factor libbson and libmongoc base64 code
- Closed
- is depended on by
-
SERVER-35672 Include BSON 1.10.3 in embedded SDK
- Closed
- related to
-
CDRIVER-2688 Crash from swift driver calling bson_init_from_json
- Closed