Commit 2886766f authored by Max Kellermann's avatar Max Kellermann

playlist/SoundCloud: use strcmp() instead of memcmp() to avoid buffer overflow

parent 6e7f8662
......@@ -157,7 +157,7 @@ handle_mapkey(void *ctx, const unsigned char *stringval, size_t stringlen)
data->key = Other;
for (i = 0; i < Other; ++i) {
if (memcmp((const char *)stringval, key_str[i], stringlen) == 0) {
if (StringStartsWith(key_str[i], {(const char *)stringval, stringlen})) {
data->key = i;
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment