Skip to content

connection: Avoid undefined pointer arithmetic

Creating a pointer that is more than one element past the end of an array is undefined behavior, even if the pointer is not dereferenced. Avoid this undefined behavior by using p >= end instead of p + 1 > end and SOMETHING > end - p instead of p + SOMETHING > end.

Signed-off-by: Demi Marie Obenour demi@invisiblethingslab.com

Merge request reports

Loading