mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 22:13:51 +00:00
(task_database_cue) Fix buffer overflow
This commit is contained in:
parent
3dcca7e060
commit
dc3a561845
@ -111,7 +111,7 @@ static ssize_t get_token(RFILE *fd, char *token, size_t max_len)
|
|||||||
static int find_token(RFILE *fd, const char *token)
|
static int find_token(RFILE *fd, const char *token)
|
||||||
{
|
{
|
||||||
int tmp_len = strlen(token);
|
int tmp_len = strlen(token);
|
||||||
char *tmp_token = (char*)calloc(tmp_len, 1);
|
char *tmp_token = (char*)calloc(tmp_len+1, 1);
|
||||||
|
|
||||||
if (!tmp_token)
|
if (!tmp_token)
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user