0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02: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:
reimar 2006-04-14 21:51:45 +00:00
parent 79e10e452c
commit 86acb156cf

View File

@ -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 {