[SERVER-45639] Use safeNumberLong() to parse wTimeout from command Created: 17/Jan/20 Updated: 29/Oct/23 Resolved: 28/Jan/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jason Chan | Assignee: | Jason Chan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | Repl 2020-01-27, Repl 2020-02-10 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 95 | ||||||||||||||||
| Description |
|
We currently parse the wTimeout field of a writeConcern object using numberInt(). However, the documentation for numberInt() states that we will get undefined behavior for cases like when given a double too large/small to be expressed as an int or a double that is NaN. The documentation suggests using safeNumberLong() instead. |
| Comments |
| Comment by Githook User [ 25/Jan/20 ] |
|
Author: {'username': 'jasonjhchan', 'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com'}Message: |