Skip to content

Crash signature "WPEFramework::Core::JSON::String::Serialize" seen in multiple places #6348

@npoltorapavlo

Description

@npoltorapavlo

Root cause - uninitialized char arrays. By assigning such to WPEFramework::Core::JSON::String there is a segfault with given signature. In several investigated cases char[] come from IARM_Bus_..._Param_t structures. IARM_Bus_Call may not initialize the array, and the calling code isn't checking for errors.

E.g

IARM_Bus_..._Param_t param;   <--- uninitialized
IARM_Result_t res = IARM_Bus_Call(..., (void *)&param,  <--- result not checked
LOGWARN("... %s\n", param.powerState   <--- use of uninitialized
response["state"] = string (param.powerState   <--- use of uninitialized

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions