snprintf Format String security vulnerability issue

We have a Coverity bug for this line of code: snprintf( tempStr, size, testStrings[testID], A2DtoV(testResults[testID].value), A2DtoV(testResults[testID].min),A2DtoV(testResults[testID].max)); The error says: non_const_printf_format_string: "format string is not a string literal, potential security vulnerability if user controlled" I changed testStrings to a const, but that didn't do anything: static const char *testStrings[] = {"1", ... etc}; Any ideas as to what this error is really saying?

以上就是snprintf Format String security vulnerability issue的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准