Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp
diff options
context:
space:
mode:
authorBilly Robert O'Neal III2020-05-11 20:38:09 -0700
committerMartin Hořeňovský2020-07-12 21:00:25 +0200
commitc24f7e5b3483b595b125b146fd175bab0e27e229 (patch)
treeee196411b51f76555d8d2a3f2a893df15b13ba91 /tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp
parent7dae3efad2c49853ddab0b26d6d1c0e8b39603f7 (diff)
downloadcatch3-c24f7e5b3483b595b125b146fd175bab0e27e229.tar.gz
Fix invalid isspace call detected by PREfast
D:\vcpkg\toolsrc\include\catch2\catch.hpp(11285): warning C6330: 'char' passed as _Param_(1) when 'unsigned char' is required in call to 'isspace'. D:\vcpkg\toolsrc\include\catch2\catch.hpp(11288): warning C6330: 'char' passed as _Param_(1) when 'unsigned char' is required in call to 'isspace'. ISO/IEC 9899:2011: "7.4 Character handling <ctype.h>"/1 [...] In all cases the argument is an int, the value of which shall be representable as an unsigned char or shall equal the value of the macro EOF. If the argument has any other value, the behavior is undefined. This means if isspace was passed a character like ñ it could corrupt memory without the static_cast to treat it as a positive value after integral promotion (and C libraries commonly use the int index supplied as a key into a table which result in out of bounds access if the resulting int is negative).
Diffstat (limited to 'tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp')
0 files changed, 0 insertions, 0 deletions