Skip to content

Commit 63d79b6

Browse files
committed
CID-100578 (Coverity) fix unchecked return value
1 parent 1ca350a commit 63d79b6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/libbson/src/bson/bson-json.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -984,10 +984,13 @@ _bson_json_read_string (bson_json_reader_t *reader, /* IN */
984984
}
985985
} break;
986986
case BSON_JSON_LF_DOUBLE: {
987-
_bson_json_parse_double (reader,
988-
(const char *) val,
989-
vlen,
990-
&bson->bson_type_data.v_double.value);
987+
if (!_bson_json_parse_double (reader,
988+
(const char *) val,
989+
vlen,
990+
&bson->bson_type_data.v_double.value)) {
991+
/* the error is set, return and let the reader exit */
992+
return;
993+
}
991994
} break;
992995
case BSON_JSON_LF_DATE: {
993996
int64_t v64;

0 commit comments

Comments
 (0)