Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer overflow bug in xtea.cpp. #183

Open
xpol opened this issue Oct 23, 2015 · 0 comments
Open

buffer overflow bug in xtea.cpp. #183

xpol opened this issue Oct 23, 2015 · 0 comments

Comments

@xpol
Copy link
Contributor

xpol commented Oct 23, 2015

static unsigned char *fix_key_length(unsigned char *key, xxtea_long key_len)
{
    unsigned char *tmp = (unsigned char *)malloc(16);
    memcpy(tmp, key, key_len);
    memset(tmp + key_len, '\0', 16 - key_len);
    return tmp;
}

What if key_len > 16?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant