[SERVER-71413] RecordData should store size as unsigned Created: 16/Nov/22 Updated: 27/Mar/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Matt Kneiser | Assignee: | Matt Kneiser |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
The RecordData class uses a signed int to store its size and implicitly converts it to size_t }}in a few places like calls to {{memcpy() and SharedBuffer::allocate(). Since there is no sentinel value for having a negative size, size should be stored as unsigned.
The outdated TODO in the file can be removed as well. |