Fix -Wstringop-truncation warnings in optimized asan build in rizin code#794
Conversation
ret2libc
left a comment
There was a problem hiding this comment.
Are you sure this actually fixes the warnings? It seems to me nothing changes. The string truncation can happen anyway (AFAIK the issue is that you limit a string potentially longer than the destination) and actually by using -1 you just never use the last char, which was already set to \0.
Codecov Report
@@ Coverage Diff @@
## dev #794 +/- ##
==========================================
- Coverage 42.81% 42.78% -0.03%
==========================================
Files 871 871
Lines 316986 316985 -1
==========================================
- Hits 135703 135610 -93
- Misses 181283 181375 +92
Continue to review full report at Codecov.
|
Yes, see https://github.com/rizinorg/rizin/runs/2055943596.
The problem isn't the truncation. It's the |
Your checklist for this pull request
Detailed description
This pr fixes warnings of the following form in the optimized asan build of #260 in rizin code (https://github.com/rizinorg/rizin/runs/2031121204, View raw logs, search for "-Wstringop-truncation" ignoring the capstone code):
Test plan
All builds are green.
Closing issues
...