Skip to content

Possible buffer overflow in uclient.c:170 #5

Description

@uklatt
[ 20%] Building C object CMakeFiles/cshark.dir/src/uclient.c.o
/opt/buildbot/slaves/lede-slave-tah/mips_24kc/build/sdk/build_dir/target-mips_24kc_musl/cshark-2015-11-24-e575ab3d35d75a6f70488001fcba45690ebe9b3e/src/uclient.c: In function 'cshark_uclient_init':
/opt/buildbot/slaves/lede-slave-tah/mips_24kc/build/sdk/build_dir/target-mips_24kc_musl/cshark-2015-11-24-e575ab3d35d75a6f70488001fcba45690ebe9b3e/src/uclient.c:170:50: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1007 [-Werror=format-truncation=]
   snprintf(extra_tags, BUFSIZ, "?additional_tags=%s", config.tags);
                                                  ^~   ~~~~~~
/opt/buildbot/slaves/lede-slave-tah/mips_24kc/build/sdk/build_dir/target-mips_24kc_musl/cshark-2015-11-24-e575ab3d35d75a6f70488001fcba45690ebe9b3e/src/uclient.c:170:3: note: 'snprintf' output between 18 and 1041 bytes into a destination of size 1024
   snprintf(extra_tags, BUFSIZ, "?additional_tags=%s", config.tags);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
CMakeFiles/cshark.dir/build.make:88: recipe for target 'CMakeFiles/cshark.dir/src/uclient.c.o' failed

I made a pull request...

Uwe

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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