liangfu commented on a change in pull request #6044:
URL: https://github.com/apache/incubator-tvm/pull/6044#discussion_r454051962



##########
File path: src/runtime/crt/common/packed_func.c
##########
@@ -85,6 +85,7 @@ int TVMPackedFunc_InitGlobalFunc(TVMPackedFunc* pf, const 
char* name, const TVMA
     return status;
   }
 
+  strncpy(pf->name, name, sizeof(pf->name));

Review comment:
       Please use `snprintf` instead, since `strncpy` is unsafe. see 
https://stackoverflow.com/questions/12275381/strncpy-vs-sprintf




----------------------------------------------------------------
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:
[email protected]


Reply via email to