NagyDonat wrote: [Replying to the following inline comment of @steakhal :] > You had a comment about __builtin___vsprintf_chk. ``` // This is using `equals()` instead of more lenient prefix/suffix/substring // checks because we don't want to say that e.g. `__builtin___vsprintf_chk()` // is a hardened variant of `sprintf()`. ``` > I wonder if we could have a test demonstrating that.
Instead of demonstrating this with `sprintf` / `vsprintf`, I ended up creating testcases that use `memcpy` / `wmemcpy`, because in the non-hardened case the analogous problem was tested with `memcpy` / `wmemcpy`. I wrote this comment before creating those testcases; now that the testcases are there, I removed the comment (by merging your suggestion that tweaks the adjacent code). https://github.com/llvm/llvm-project/pull/86536 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits