No description provided.
Bugfix: Don't save temporary pointer in CBigNum::SetHex #1934
pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:bugfix_bignum_tmp changing 1 files +6 −2-
luke-jr commented at 3:21 PM on October 15, 2012: member
-
Bugfix: Don't save temporary pointer in CBigNum::SetHex 851e8203af
-
sipa commented at 3:23 PM on October 15, 2012: member
I don't see why this is a bugfix. The result of c_str is guaranteed to remain accessible as long as the backing string isn't modified.
-
luke-jr commented at 3:38 PM on October 15, 2012: member
Hmm, didn't know that. Okay.
- luke-jr closed this on Oct 15, 2012
-
laanwj commented at 4:09 PM on October 15, 2012: member
I agree that in general it's bad form to store the result of c_str(), as it makes for fragile code, but in this case it's a constant parameter so it's ok.
- KolbyML referenced this in commit c576916cf2 on Dec 5, 2020
- DrahtBot locked this on Sep 8, 2021