playlist/SoundCloud: use strcmp() instead of memcmp() to avoid buffer overflow
This commit is contained in:
@@ -157,7 +157,7 @@ handle_mapkey(void *ctx, const unsigned char *stringval, size_t stringlen)
|
|||||||
data->key = Other;
|
data->key = Other;
|
||||||
|
|
||||||
for (i = 0; i < Other; ++i) {
|
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;
|
data->key = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user