Skip to content

Compile warning (and potential segfault) after merge from calve/do_not_show_diff #780

@vikman90

Description

@vikman90

When I compile the master branch I get the following warning:

config/syscheck-config.c: In function ‘Read_Syscheck’:
config/syscheck-config.c:751:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char **’ [-Wformat=]
                     verbose("Set nodiff regex: %s", syscheck->nodiff_regex[nodiff_size]->patterns);

Indeed, syscheck->nodiff_regex[]->patterns is a pointer to a matrix and might raise a segmentation fault if was read as a string.

This issue is caused by the commit d8a57c4 (pull request #765).

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