Skip to content

checkStamp: prevent array size promotion/truncation

Calls to checkStamp are passing literals that are not 20 bytes in size. This causes a "promotion" of the size in the context of checkStamp. We can quiet these warnings by just marking the parameter as a pointer.

Note: a safer approach would be to pass a pointer and length.

This was detected by gcc 11.2.0:

ooii.c:1018:9: error: 'checkStamp' accessing 20 bytes in a region of size 11 [-Werror=stringop-overflow=] ...

Merge request reports