You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/10/12 14:23:00 UTC

[jira] [Commented] (GEODE-9553) Review and eliminate all remaining usage of sprintf, snprintf, etc

    [ https://issues.apache.org/jira/browse/GEODE-9553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17427702#comment-17427702 ] 

ASF subversion and git services commented on GEODE-9553:
--------------------------------------------------------

Commit 7eed9d3868118f5f0d1d93f75c2a4b64ddb7cead in geode-native's branch refs/heads/develop from Blake Bender
[ https://gitbox.apache.org/repos/asf?p=geode-native.git;h=7eed9d3 ]

GEODE-9553: remove usage of sprintf from tests (#879)



> Review and eliminate all remaining usage of sprintf, snprintf, etc
> ------------------------------------------------------------------
>
>                 Key: GEODE-9553
>                 URL: https://issues.apache.org/jira/browse/GEODE-9553
>             Project: Geode
>          Issue Type: Improvement
>          Components: native client
>            Reporter: Blake Bender
>            Priority: Major
>              Labels: pull-request-available
>
> From time to time, we will pick up a new version of a compiler on one or another platform we build on, and get new complaints about potential buffer overflows or other assorted badness around persistent use of sprintf.  See the following pull request, e.g.: https://github.com/apache/geode-native/pull/861
> Fixing these when they come up is good as far as it goes, but we're really just applying band-aids to the problem.  *All* use of sprintf is bad, snprintf only slightly less so.  Someone needs to just go through the code and rewrite all instances in modern C++ using std::string, std::stringstream, etc.
> At a glance, here is the list of remaining files containing calls to sprintf:
> {code}
> c:\Users\bblake\src\geode-native>findstr /sm sprintf *.cpp
> cppcache\integration\test\ThinClientConflation.cpp
> cppcache\integration-test\fw_dunit.cpp
> cppcache\integration-test\testCacheless.cpp
> cppcache\integration-test\testOverflowPutGetSqLite.cpp
> cppcache\integration-test\testRegionMap.cpp
> cppcache\integration-test\testSerialization.cpp
> cppcache\integration-test\testThinClientBigValue.cpp
> cppcache\integration-test\testThinClientCacheablesLimits.cpp
> cppcache\integration-test\testThinClientCacheableStringArray.cpp
> cppcache\integration-test\testThinClientConflation.cpp
> cppcache\integration-test\testThinClientCq.cpp
> cppcache\integration-test\testThinClientCqDurable.cpp
> cppcache\integration-test\testThinClientCqFailover.cpp
> cppcache\integration-test\testThinClientCqHAFailover.cpp
> cppcache\integration-test\testThinClientCqIR.cpp
> cppcache\integration-test\testThinClientDeltaWithNotification.cpp
> cppcache\integration-test\testThinClientGetInterests.cpp
> cppcache\integration-test\testThinClientHADistOps.cpp
> cppcache\integration-test\testThinClientHAEventIDMap.cpp
> cppcache\integration-test\testThinClientHAFailover.cpp
> cppcache\integration-test\testThinClientHAFailoverRegex.cpp
> cppcache\integration-test\testThinClientHAMixedRedundancy.cpp
> cppcache\integration-test\testThinClientHAPeriodicAck.cpp
> cppcache\integration-test\testThinClientHeapLRU.cpp
> cppcache\integration-test\testThinClientInterest1_Bug1001.cpp
> cppcache\integration-test\testThinClientInterestNotify.cpp
> cppcache\integration-test\testThinClientIntResPolKeysInv.cpp
> cppcache\integration-test\testThinClientListenerCallbackArgTest.cpp
> cppcache\integration-test\testThinClientLRUExpiration.cpp
> cppcache\integration-test\testThinClientMultiDS.cpp
> cppcache\integration-test\testThinClientNotificationWithDeltaWithoutcache.cpp
> cppcache\integration-test\testThinClientPdxDeltaWithNotification.cpp
> cppcache\integration-test\testThinClientPdxInstance.cpp
> cppcache\integration-test\testThinClientPoolAttrTest.cpp
> cppcache\integration-test\testThinClientPoolExecuteFunctionThrowsException.cpp
> cppcache\integration-test\testThinClientPoolExecuteHAFunction.cpp
> cppcache\integration-test\testThinClientPoolExecuteHAFunctionPrSHOP.cpp
> cppcache\integration-test\testThinClientPoolRedundancy.cpp
> cppcache\integration-test\testThinClientPRPutAllFailover.cpp
> cppcache\integration-test\testThinClientRemoteQueryRS.cpp
> cppcache\integration-test\testThinClientRemoteQuerySS.cpp
> cppcache\integration-test\testThinClientRemoteRegionQuery.cpp
> cppcache\integration-test\testThinClientRemoveOps.cpp
> cppcache\integration-test\testThinClientSecurityPostAuthorization.cpp
> cppcache\integration-test\testXmlCacheCreationWithPools.cpp
> cppcache\integration-test\testXmlCacheInitialization.cpp
> tests\cpp\security\PkcsCredentialGenerator.cpp
> tests\cpp\security\XmlAuthzCredentialGenerator.cpp
> tests\cpp\testobject\BatchObject.cpp
> tests\cpp\testobject\DeltaPSTObject.cpp
> tests\cpp\testobject\DeltaTestImpl.cpp
> tests\cpp\testobject\EqStruct.cpp
> tests\cpp\testobject\FastAssetAccount.cpp
> tests\cpp\testobject\InvalidPdxUsage.cpp
> tests\cpp\testobject\NestedPdxObject.cpp
> tests\cpp\testobject\PdxClassV1.cpp
> tests\cpp\testobject\PdxClassV2.cpp
> tests\cpp\testobject\PdxType.cpp
> tests\cpp\testobject\Portfolio.cpp
> tests\cpp\testobject\PortfolioPdx.cpp
> tests\cpp\testobject\Position.cpp
> tests\cpp\testobject\PositionPdx.cpp
> tests\cpp\testobject\PSTObject.cpp
> tests\cpp\testobject\VariousPdxTypes.cpp
> {code}
> and snprintf:
> {code}
> c:\Users\bblake\src\geode-native>findstr /sm snprintf *.cpp
> cppcache\src\CacheXmlParser.cpp
> cppcache\src\CqEventImpl.cpp
> cppcache\src\Log.cpp
> cppcache\src\PdxFieldType.cpp
> cppcache\src\PdxInstanceImpl.cpp
> cppcache\src\RegionFactory.cpp
> cppcache\src\RemoteQuery.cpp
> cppcache\src\statistics\AtomicStatisticsImpl.cpp
> cppcache\src\statistics\OsStatisticsImpl.cpp
> cppcache\src\TcrMessage.cpp
> cppcache\src\ThinClientRegion.cpp
> cppcache\src\Utils.cpp
> tests\cpp\testobject\Portfolio.cpp
> tests\cpp\testobject\PortfolioPdx.cpp
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)