Skip to content

Possible Buffer Overflow issues #111

Description

@stclairc

When building from source the following warnings are observed:
HostInterface.c:1099:48: warning: ‘%s’ directive writing up to 2099 bytes into a region of size 88 [-Wformat-overflow=]
HostInterface.c:1005:48: warning: ‘%s’ directive writing up to 2099 bytes into a region of size 88 [-Wformat-overflow=]
HostInterface.c:247:48: warning: ‘%s’ directive writing up to 2099 bytes into a region of size 88 [-Wformat-overflow=]
SoundInput.c:3413:37: warning: ‘ > ’ directive writing 3 bytes into a region of size between 0 and 31 [-Wformat-overflow=]
../ARDOPCommonCode/ALSASound.c:392:55: warning: ‘%02d’ directive writing between 2 and 5 bytes into a region of size between 0 and 18 [-Wformat-overflow=]

I suggest changing to "snprintf" to help avoid the possible overflows.
Sizing on cmdCopy and strFault appear insufficient.

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