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?

  1. Why did you switch {size_t,int} -> unsigned int
  2. The match changes: m_nCurFieldAlloc * 4 / 3 + nCharsLen + 1 -> drops the 4 and has an if/else

Thanks!

Change History (2)

comment:1 by Even Rouault, 8 years ago

  1. {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
  1. "m_nCurFieldAlloc * 4 / 3 + nCharsLen + 1" could overflow int/unsigned int. m_nCurFieldAlloc * 4 / 3 == nCurFieldAlloc + nCurFieldAlloc / 3 without overflow risk

comment:2 by Kurt Schwehr, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.