mirror of
https://github.com/mpv-player/mpv
synced 2025-03-06 22:28:01 +00:00
avoid crash when running "mplayer -loop" (dereferencing uninitialize pointer).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18098 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
79e10e452c
commit
86acb156cf
@ -140,9 +140,9 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv)
|
||||
if(strcasecmp(opt,"loop") == 0 &&
|
||||
(! last_entry || last_entry->child) ) {
|
||||
int l;
|
||||
char* end;
|
||||
char* end = NULL;
|
||||
l = (i+1<argc) ? strtol(argv[i+1],&end,0) : 0;
|
||||
if(*end != '\0') {
|
||||
if(!end || *end != '\0') {
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The loop option must be an integer: %s\n",argv[i+1]);
|
||||
tmp = ERR_OUT_OF_RANGE;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user