Skip to content

[bug] Buffer overflow when building portal file name from command line argument in vvis's RunVVis #749

@dimhotepus

Description

@dimhotepus

sprintf is used to build portal file name from argv[i]:

sprintf ( portalfile, "%s%s", inbase, argv[i] );

where portalfile is defined as char array of 1024 length:

char portalfile[1024];

When you pass argv[i] command line argument with length >= 1024 you overflow portalfile buffer.

Use tier1/strtools.h V_sprintf_safe to prevent buffer overflow.

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