CMFSUPPORT-3699 Coverity TEST. DO NOT MERGE#188
CMFSUPPORT-3699 Coverity TEST. DO NOT MERGE#188scthunderbolt wants to merge 4 commits intodevelopfrom
Conversation
DO NOT MERGE
There was a problem hiding this comment.
Pull request overview
This PR removes the appId parameter from a logging statement in the applicationStateChanged method. However, the format string still expects 4 arguments while only 3 are now provided, creating a critical bug.
Changes:
- Removed
appId.c_str()argument from a GDIAL_LOGINFO call in the applicationStateChanged function
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -74,7 +74,6 @@ class GDialCastObject | |||
| { | |||
| GDIAL_LOGINFO("AppName[%s] AppID[%s] State[%s] Error[%s]", | |||
| AppObj->appName.c_str(), | |||
There was a problem hiding this comment.
The format string expects 4 arguments (AppName, AppID, State, Error) but only 3 arguments are now provided after removing the appId parameter. This will cause undefined behavior and potentially a crash when the logging function tries to read the missing argument. Either remove the "AppID[%s]" placeholder from the format string or restore the appId.c_str() argument.
| AppObj->appName.c_str(), | |
| AppObj->appName.c_str(), | |
| AppObj->appId.c_str(), |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -74,7 +74,6 @@ class GDialCastObject | |||
| { | |||
| GDIAL_LOGINFO("AppName[%s] AppID[%s] State[%s] Error[%s]", | |||
There was a problem hiding this comment.
Coverity Issue - Missing argument to printf format specifier
No argument for format specifier "%s".
Medium Impact, CWE-685
PRINTF_ARGS
DO NOT MERGE