Skip to content

Commit 4bf18b0

Browse files
Empactfanquake
authored andcommitted
Replace use of boost::trim_right with locale-independent TrimString
Note the only use of readStdin is fed to DecodeHexTx, which fails in IsHex on non-hex characters as recorded in p_util_hexdigit.
1 parent 9355186 commit 4bf18b0

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/bitcoin-tx.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -772,9 +772,7 @@ static std::string readStdin()
772772
if (ferror(stdin))
773773
throw std::runtime_error("error reading stdin");
774774

775-
boost::algorithm::trim_right(ret);
776-
777-
return ret;
775+
return TrimString(ret);
778776
}
779777

780778
static int CommandLineRawTx(int argc, char* argv[])

test/lint/lint-locale-dependence.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export LC_ALL=C
3939

4040
KNOWN_VIOLATIONS=(
4141
"src/bitcoin-tx.cpp.*stoul"
42-
"src/bitcoin-tx.cpp.*trim_right"
4342
"src/dbwrapper.cpp.*stoul"
4443
"src/dbwrapper.cpp:.*vsnprintf"
4544
"src/node/blockstorage.cpp:.*atoi"

0 commit comments

Comments
 (0)