This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] CERT: STR37-C
AbandonedPublic

Authored by zukatsinadze on May 4 2020, 12:36 PM.

Details

Summary

This patch introduces a new checker:
alpha.security.cert.str.37c

This checker is implemented based on the following rule:
https://wiki.sei.cmu.edu/confluence/x/BNcxBQ
The check warns if the argument of a character handling
function is not representable as unsigned char.

Diff Detail

Event Timeline

zukatsinadze created this revision.May 4 2020, 12:36 PM

Adding @martong, because I fear that this is colliding with StdLibraryFunctionsChecker. The warnings added here seem to be, in essence, identical to D73898.

Adding @martong, because I fear that this is colliding with StdLibraryFunctionsChecker. The warnings added here seem to be, in essence, identical to D73898.

Indeed. I think the best way forward is to add missing functions (I think these are toascii, toupper, tolower) to @martong's checker to guarantee that CERT rule is covered completely.

zukatsinadze abandoned this revision.May 5 2020, 7:17 AM

I'm afraid so. The patch otherwise looked really clean, sorry to ruin the day! :)