Where are inner null bytes valid in p2p messages
Where are inner null bytes valid in p2p messages
Loading saved threads...
yancy · External communityPost link
External question — Bitcoin Stack Exchange
Author: yancy
Original post: https://bitcoin.stackexchange.com/questions/130721
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
P2P messages use null bytes as padding when the field size is larger than the content. For example, a command field is interpreted as 12 byte ASCII, so the version command is typically as follows:
version\0\0\0\0\0
My question is, is it also valid to have inner null bytes? eg:
ver\0sion\0\0\0\0
Some protocol applications I notice treat inner null bytes as valid, which seems mistaken.
Quote
Report
RedGrittyBrick · External communityPost link
External answer — Bitcoin Stack Exchange
Author: RedGrittyBrick
Original post: https://bitcoin.stackexchange.com/a/130756
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
OP reported:
bitcoin-core will reject messages that contain inner null characters in the command field of a network header.
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Bitcoin Stack Exchange Author: RedGrittyBrick Source score (net votes, not local likes): 1 Original post: https://bitcoin.stackexchange.com/a/130756 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. OP reported: bitcoin-core will reject messages that contain inner null characters in the command field of a network header.
Checking account access…