Skip to content

gcc warns memcpy will always overflow: memcpy(&icmp, p, sizeof(subtcp)); (Mac OS) #53

Description

@dxjones

I get this compiler warning on Mac OS.

This looks like a buffer overflow that needs to get fixed.

gcc -c -O2 -Wall    -g  scan.c
scan.c:459:4: warning: 'memcpy' will always overflow; destination buffer has size 8, but size argument is 20 [-Wbuiltin-memcpy-chk-size]
                        memcpy(&icmp, p, sizeof(subtcp));
                        ^
1 warning generated.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions