-
Notifications
You must be signed in to change notification settings - Fork 455
CDRIVER-4662 Check for Decimal128 exponent overflow #1349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0331a34
d2a6642
60824e3
5213f41
ab802e4
661d578
43d6a48
928a132
43e6094
7c77480
6b5eb17
8fc7427
fd02d95
0de9502
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1124,9 +1124,9 @@ _bson_json_read_string (bson_json_reader_t *reader, /* IN */ | |
} break; | ||
case BSON_JSON_LF_DECIMAL128: { | ||
bson_decimal128_t decimal128; | ||
bson_decimal128_from_string (val_w_null, &decimal128); | ||
|
||
if (bson->read_state == BSON_JSON_IN_BSON_TYPE) { | ||
if (bson_decimal128_from_string (val_w_null, &decimal128) && | ||
bson->read_state == BSON_JSON_IN_BSON_TYPE) { | ||
bson->bson_type_data.v_decimal128.value = decimal128; | ||
} else { | ||
goto BAD_PARSE; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On failure,
I think this message is fine as is, but potentially could be more helpful to the user with some changes. I believe it would involve adding some return information from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it may help to determine the cause of the error with a new function: |
||
|
Uh oh!
There was an error while loading. Please reload this page.