mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
scripted-diff: Rename SetHex to SetHexDeprecated
SetHex is fragile, because it accepts any non-hex input or any length of input, without error feedback. This can lead to issues when the input is truncated or otherwise corrupted. Document the problem by renaming the method. In the future, the fragile method should be removed from the public interface. -BEGIN VERIFY SCRIPT- sed -i 's/SetHex/SetHexDeprecated/g' $( git grep -l SetHex ./src ) -END VERIFY SCRIPT-
This commit is contained in:
parent
fafe4b8051
commit
fa103db2bb
6 changed files with 19 additions and 19 deletions
|
|
@ -239,7 +239,7 @@ bool ParseHashStr(const std::string& strHex, uint256& result)
|
|||
if ((strHex.size() != 64) || !IsHex(strHex))
|
||||
return false;
|
||||
|
||||
result.SetHex(strHex);
|
||||
result.SetHexDeprecated(strHex);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue