Skip to content

Dahdi-linux: Improper use of string operationsΒ #89

@pprindeville

Description

@pprindeville

I'm looking at various string constructs in (for example) drivers/dahdi/dahdi-base.c:

strncat(vi.echo_canceller + strlen(vi.echo_canceller),
        ec_name, space);

which doesn't make sense. strncat(s1, s2, n) already finds the strlen(s1) when doing the append. This is redundant. Either do:

strncat(vi.echo_canceller,
        ec_name, space);

or:

strncpy(vi.echo_canceller + strlen(vi.echo_canceller),
        ec_name, space);

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