You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[-Wunsafe-buffer-usage] Accept calls to some libc functions with annotated arguments & Let libc warnings yield to bounds attributes (#10182)
Cherry-pick two commits:
* [Upstream][C++ Safe Buffers] Let libc warnings yield to bounds attributes
For a call to an unsafe libc function, do not warn about it if its
callee function has any bounds attributes. Because we can verify the
safety of the call using bounds attributes.
(rdar://140138380)
* [-Wunsafe-buffer-usage] Accept calls to some libc functions with annotated arguments (#10088)
- `printf`, `fprintf` `snprintf` functions accept `__null_terminated`
- `snprintf` function accepts `__counted_by/__sized_by`
- functions consuming a single string pointer like `strlen` or `atoi`
accept `__null_terminated`
Generalized `isCountAttributedPointerArgumentSafe` so that it is
shared by interoperation gadgets and the unsafe libc gadget.
(A follow-up change to rdar://138798346)
0 commit comments