Skip to content

_php_ibase_attach_db() does not check buffer overflow #108

Description

@mlazdans

dpb_len = slprintf(dpb, buf_len, "%c%c%s", dpb_args[i],(unsigned char)len[i],args[i]);

Use snprintf() instead slprintf()

https://www.phpinternalsbook.com/php7/internal_types/strings/printing_functions.html

snprintf() returns the number of characters that could have been used, whereas slprintf() returns the number of characters that have effectively been used, thus enabling to detect too-small buffers and string truncation. This, is not counting the final ‘\0’.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions