[PATCH] D46545: [sanitizer] Add fgets, fputs and puts into sanitizer_common
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 11 14:01:59 PDT 2018
vitalybuka accepted this revision.
vitalybuka added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:1200
+ // https://github.com/google/sanitizers/issues/321.
+ char *res = REAL(fgets)(s, size, file);
+ if (res) COMMON_INTERCEPTOR_WRITE_RANGE(ctx, s, REAL(strlen)(s) + 1);
----------------
I'd expect
```
if (res)
COMMON_INTERCEPTOR_WRITE_RANGE
```
Could you try:
```
git clang-format -f --style=file --extensions=inc,cc,h,c,cpp HEAD^
```
https://reviews.llvm.org/D46545
More information about the llvm-commits
mailing list