Skip to content

sent url includes trailing \0 byte #112

@Akuli

Description

@Akuli

fiche/fiche.c

Lines 661 to 665 in 4bba916

char url[len];
snprintf(url, len, "%s%s%s%s", c->settings->domain, "/", slug, "\n");
// Send the response
write(c->socket, url, len);

I first noticed this problem a few years ago when this code was introduced and it broke the pastebin plugin of my editor. I changed the plugin to strip away the \0 byte, so maybe it is now a feature, and not a bug :)

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