You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by GitBox <gi...@apache.org> on 2020/08/21 03:07:11 UTC

[GitHub] [incubator-pegasus] levy5307 commented on a change in pull request #575: fix: replace use of insecure sprintf

levy5307 commented on a change in pull request #575:
URL: https://github.com/apache/incubator-pegasus/pull/575#discussion_r474383150



##########
File path: src/client_lib/pegasus_client_factory_impl.cpp
##########
@@ -23,7 +23,7 @@ bool pegasus_client_factory_impl::initialize(const char *config_file)
             // use config file to run
             char exe[] = "client";
             char config[1024];
-            sprintf(config, "%s", config_file);
+            snprintf(config, 1024, "%s", config_file);

Review comment:
       I think you should define a const variable for the value `1024`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org