Opened 8 years ago
Closed 8 years ago
#6499 closed task (fixed)
Would like an explanation of the changes to GML in r33182
Reported by: | Kurt Schwehr | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
Even,
Can you explain a bit more about the changes in r33182?
- Why did you switch {size_t,int} -> unsigned int
- The match changes: m_nCurFieldAlloc * 4 / 3 + nCharsLen + 1 -> drops the 4 and has an if/else
Thanks!
Change History (2)
comment:1 by , 8 years ago
- {size_t,int} -> unsigned int : probably because we don't want negative values, and not too big values either. In practice only the [0, INT_MAX[ range should be used
- "m_nCurFieldAlloc * 4 / 3 + nCharsLen + 1" could overflow int/unsigned int. m_nCurFieldAlloc * 4 / 3 == nCurFieldAlloc + nCurFieldAlloc / 3 without overflow risk
comment:2 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.