Don't use hand-rolled string manipulation routine with a fixed buffer in the bitcoin core, instead make use of c++ strings and boost high-level string algorithms.
get rid of strlcpy.h #1901
pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2012_10_remove_strlcpy changing 7 files +30 −129-
laanwj commented at 7:56 PM on October 2, 2012: member
-
in src/irc.cpp:None in a85bb5af93 outdated
324 | @@ -324,27 +325,24 @@ void ThreadIRCSeed2(void* parg) 325 | if (vWords.size() < 2) 326 | continue; 327 | 328 | - char pszName[10000]; 329 | - pszName[0] = '\0'; 330 | + std::string pszName;
gavinandresen commented at 8:06 PM on October 2, 2012:"psz" prefix means pointer-to-string-terminated-with-zero. Should be strName if we want to keep using type prefixes...
laanwj commented at 8:19 PM on October 2, 2012:Ok, will change those to str
laanwj commented at 4:53 AM on October 3, 2012: memberThey're str* now
(interesting bit of oversight here, those psz* prefixes are to me like funny variable names, didn't even think for one second that they had meaning about the type. A possible relation between types and variable names just doesn't fit into my head :-) )
BitcoinPullTester commented at 9:17 AM on October 6, 2012: noneAutomatic sanity-testing: FAILED BUILD/TEST, see http://jenkins.bluematt.me/pull-tester/416279c3a82f2ef13d3c7dab368e1f139ec950b9 for binaries and test log.
This could happen for one of several reasons:
- It chanages paths in makefile.linux-mingw or otherwise changes build scripts in a way that made them incompatible with the automated testing scripts
- It does not build on either Linux i386 or Win32 (via MinGW cross compile)
- The test suite fails on either Linux i386 or Win32
- The block test-cases failed (lookup the first bNN identifier which failed in https://github.com/TheBlueMatt/test-scripts/blob/master/FullBlockTestGenerator.java)
laanwj commented at 9:43 AM on October 6, 2012: memberSeems that the windows build needed some boost headers headers in util.cpp:
util.cpp: In function 'void ParseParameters(int, const char* const*)': util.cpp:510: error: 'to_lower' is not a member of 'boost' util.cpp:511: error: 'starts_with' is not a member of 'boost::algorithm'Fixed, cross compile works again.
sipa commented at 12:35 PM on October 7, 2012: memberCan you also remove strlcpy.h from doc/assets-attribution.txt?
6032e4f4e7get rid of strlcpy.h
Don't use hand-rolled string manipulation routine with a fixed buffer in the bitcoin core, instead make use of c++ strings and boost.
laanwj commented at 12:39 PM on October 7, 2012: memberDone
sipa commented at 12:52 PM on October 7, 2012: memberACK
jgarzik commented at 10:10 PM on October 8, 2012: contributorACK
laanwj referenced this in commit ac0ad5dc63 on Oct 11, 2012laanwj merged this on Oct 11, 2012laanwj closed this on Oct 11, 2012laanwj deleted the branch on Apr 9, 2014KolbyML referenced this in commit 443318460f on Dec 5, 2020DrahtBot locked this on Sep 8, 2021
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-04-13 15:16 UTC
More mirrored repositories can be found on mirror.b10c.me