Commit 8a85033
authored
CDRIVER-5681 Address potential buffer overflow when writing null terminator after decimal128 significand digits (#1719)
* Address integer overflow when writing null terminator for decimal128 string
* Add test case for truncated significand
* BSON_ASSERT + strcmp -> ASSERT_CMPSTR
* Add test case for untruncated significand
* Extend significand truncation tests to assert inexact rounding errors
* Assert return value of bson_decimal128_from_string
* BSON_ASSERT -> ASSERT1 parent 865ff9b commit 8a85033
File tree
2 files changed
+348
-297
lines changed- src/libbson
- src/bson
- tests
2 files changed
+348
-297
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
285 | 288 | | |
286 | | - | |
| 289 | + | |
287 | 290 | | |
288 | 291 | | |
289 | 292 | | |
| |||
296 | 299 | | |
297 | 300 | | |
298 | 301 | | |
299 | | - | |
| 302 | + | |
300 | 303 | | |
301 | 304 | | |
302 | 305 | | |
| |||
0 commit comments