[PATCH] D49722: [CStringSyntaxChecker] Check strlcat sizeof check

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 15 12:58:44 PDT 2018


NoQ added inline comments.


================
Comment at: cfe/trunk/test/Analysis/cstring-syntax.c:45
+  strlcpy(dest, "012345678", sizeof(dest));
+  strlcat(dest, "910", sizeof(dest)); // expected-warning {{The third argument allows to potentially copy more bytes than it should. Replace with the value  <size>  - strlen(dest) - 1 or lower}}
+  strlcpy(dest, "0123456789", sizeof(dest));
----------------
There seem to be two spaces around `<size>`.


Repository:
  rL LLVM

https://reviews.llvm.org/D49722





More information about the cfe-commits mailing list