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

This commit is contained in:
Max Kellermann 2017-09-21 23:08:27 +02:00
parent 6e7f866288
commit 2886766fb5
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}