Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Pointer arithmetic in C is a powerful feature when working with many data structures, however it can lead to subtle and hard to spot coding errors.  This is due to the importance of context (the type of the pointer in question) which is likely declared outside the pointer arithmetic expression.  In the case of bounds checking, this can lead to buffer overflow vulnerabilities.

 See also