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

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_assertionhandler.cpp
diff options
context:
space:
mode:
authorBilly Robert O'Neal III2020-05-11 20:38:09 -0700
committerMartin Hořeňovský2020-05-12 14:07:22 +0200
commitb1dcdc5032f09cab0a5834476d85e999bb608ce6 (patch)
tree8462535504a5dd9ad7fd714eb657dace6428845b /include/internal/catch_assertionhandler.cpp
parentf0e596e2522f64451f6444edab5c59b8b9e8e082 (diff)
downloadcatch3-b1dcdc5032f09cab0a5834476d85e999bb608ce6.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 'include/internal/catch_assertionhandler.cpp')
0 files changed, 0 insertions, 0 deletions