`wil::zstring_view` `data` and `c_str` are not SAL annotated to indicate `_Ret_z_`, triggering analyzers
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3k
- Forks
- 300
- Avg merge
- 19h 12m
- Merged PRs (30d)
- 1
Description
The implementation of wil::zstring_view does not have SAL annotations to indicate that the pointer returned by the data and c_str points to a null-terminated sequence. We are trying to use WIL's string view to improve safety and prevent the analyzer from flagging every usage of std's string_view, especially when we forcefully need to return raw pointers across-ABI interactions. Is there a plan to add annotations? Thanks in advance!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the implementation and declarations of wil::zstring_view::data and c_str, then inspect nearby SAL annotation conventions. Add annotations that communicate null termination and verify that the intended analyzer no longer flags raw-pointer uses across ABI interactions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100