Skip to content

[minissdpc.c] Index out of bounds for type 'char[3]' #3

@Coeur

Description

@Coeur

In current version used by Transmission (which is e37cde8 from July 2017), minissdpc.c is causing undefined behavior on those lines:

miniupnpc/minissdpc.c

Lines 863 to 868 in e37cde8

tmp->buffer[urlsize] = '\0';
memcpy(tmp->st, st, stsize);
tmp->buffer[urlsize+1+stsize] = '\0';
if(usn != NULL)
memcpy(tmp->usn, usn, usnsize);
tmp->buffer[urlsize+1+stsize+1+usnsize] = '\0';

minissdpc.c:863 Index 37 out of bounds for type 'char[3]'
minissdpc.c:865 Index 89 out of bounds for type 'char[3]'
minissdpc.c:868 Index 184 out of bounds for type 'char[3]'

Screenshot 2023-11-11 at 04 04 29

I do not know if it's fixed or not in newer versions of miniupnpc: let's adopt a newer version and see from there.

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