Actions
Review #751
closedFix /BIP commands truncating output
Start date:
2022-01-05
Branch:
Description
/BIP list connections and such will truncate output without notifying the user because we use snprintf().
We can use memccpy() instead, in order to respect max line length while not truncating text, and being able to start a new line when required.
https://developers.redhat.com/blog/2019/08/12/efficient-string-copying-and-concatenation-in-c#choosing_a_solution
This will also alleviate work required in #750
Files
Updated by Loïc Gomez almost 3 years ago
- Related to Enhancement #750: Compile BIP with secure flags added
Updated by Loïc Gomez almost 3 years ago
- File memccpy_poc.c memccpy_poc.c added
Started working on it, see PoC
Actions
#3
Updated by Loïc Gomez almost 3 years ago
- File 0001-fix-bip-user-info-command.patch 0001-fix-bip-user-info-command.patch added
- File 0002-Move-BIP-commands-to-bip_strcat-f-_fit-memccpy-wrapp.patch 0002-Move-BIP-commands-to-bip_strcat-f-_fit-memccpy-wrapp.patch added
- File 0003-sanitize-bip_strcat-f-_fit-cleanup.patch 0003-sanitize-bip_strcat-f-_fit-cleanup.patch added
- Tracker changed from Bug to Review
- Status changed from New to In Progress
- Target version set to 0.9.3
- Confirmed deleted (
No)
Updated by Pierre-Louis Bonicoli over 2 years ago
- Target version changed from 0.9.3 to 0.10.0
Updated by Pierre-Louis Bonicoli over 2 years ago
- Status changed from In Progress to Resolved
- Target version changed from 0.10.0 to 0.9.3
@Loïc Gomez pointed that this one has been included in the 0.9.3 release :)
- 0001: 399a104d1ea483623ca15f39a45a699c5ececcb1
- 0002 & 0003: 34b3c4b0c3464211ef129ea9f806595833d0b645
Actions