It was casting from const unsigned char* to char*.
refactor: Preserve const in cast on CTransactionSignatureSerializer #21906
pull promag wants to merge 1 commits into bitcoin:master from promag:2021-05-fix-cast changing 1 files +2 −2-
promag commented at 6:21 PM on May 10, 2021: member
-
refactor: Preserve const in cast on CTransactionSignatureSerializer c4928aa3d3
- DrahtBot added the label Consensus on May 10, 2021
- DrahtBot added the label Refactoring on May 10, 2021
- vasild approved
-
vasild commented at 12:21 PM on May 11, 2021: member
ACK c4928aa3d30a7b708ba99fc09ddc125257bfdd17
- theStack approved
-
theStack commented at 12:17 PM on May 16, 2021: member
ACK c4928aa3d30a7b708ba99fc09ddc125257bfdd17
-
in src/script/interpreter.cpp:1306 in c4928aa3d3
1302 | @@ -1303,12 +1303,12 @@ class CTransactionSignatureSerializer 1303 | it = itBegin; 1304 | while (scriptCode.GetOp(it, opcode)) { 1305 | if (opcode == OP_CODESEPARATOR) { 1306 | - s.write((char*)&itBegin[0], it-itBegin-1); 1307 | + s.write(reinterpret_cast<const char*>(&itBegin[0]), it-itBegin-1);
MarcoFalke commented at 6:02 AM on May 17, 2021:There is a safe helper
CharCastandUCharCast, that can be used.Though, I have a patch (Bundle 2/2 of #21969) to remove
charcompletely.
MarcoFalke commented at 2:49 PM on June 6, 2021:See #22167
MarcoFalke commented at 2:52 PM on November 4, 2021:DrahtBot commented at 3:51 PM on June 6, 2021: member<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #22167 (refactor: Remove char serialize by MarcoFalke)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
promag closed this on Aug 29, 2021promag deleted the branch on Aug 29, 2021laanwj referenced this in commit 196b459920 on Jan 27, 2022DrahtBot locked this on Nov 4, 2022
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 15:14 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 15:14 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me