Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
427c9725
Commit
427c9725
authored
Aug 13, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: Fix strtol usage.
parent
2e32646b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
src/input/input.c
src/input/input.c
+25
-3
No files found.
src/input/input.c
View file @
427c9725
...
@@ -2710,6 +2710,20 @@ void MRLSplit( char *psz_dup, const char **ppsz_access, const char **ppsz_demux,
...
@@ -2710,6 +2710,20 @@ void MRLSplit( char *psz_dup, const char **ppsz_access, const char **ppsz_demux,
*
ppsz_path
=
psz_path
?
psz_path
:
(
char
*
)
""
;
*
ppsz_path
=
psz_path
?
psz_path
:
(
char
*
)
""
;
}
}
static
inline
bool
next
(
char
**
src
)
{
char
*
end
;
errno
=
0
;
long
result
=
strtol
(
*
src
,
&
end
,
0
);
if
(
errno
!=
0
||
result
>=
LONG_MAX
||
result
<=
LONG_MIN
||
end
==
*
src
)
{
return
false
;
}
*
src
=
end
;
return
true
;
}
/*****************************************************************************
/*****************************************************************************
* MRLSections: parse title and seekpoint info from the Media Resource Locator.
* MRLSections: parse title and seekpoint info from the Media Resource Locator.
*
*
...
@@ -2728,19 +2742,27 @@ static void MRLSections( input_thread_t *p_input, char *psz_source,
...
@@ -2728,19 +2742,27 @@ static void MRLSections( input_thread_t *p_input, char *psz_source,
/* Start by parsing titles and chapters */
/* Start by parsing titles and chapters */
if
(
!
psz_source
||
!
(
psz
=
strrchr
(
psz_source
,
'@'
)
)
)
return
;
if
(
!
psz_source
||
!
(
psz
=
strrchr
(
psz_source
,
'@'
)
)
)
return
;
/* Check we are really dealing with a title/chapter section */
/* Check we are really dealing with a title/chapter section */
psz_check
=
psz
+
1
;
psz_check
=
psz
+
1
;
if
(
!*
psz_check
)
return
;
if
(
!*
psz_check
)
return
;
if
(
isdigit
(
*
psz_check
)
)
strtol
(
psz_check
,
&
psz_check
,
0
);
if
(
isdigit
(
*
psz_check
)
)
if
(
!
next
(
&
psz_check
))
return
;
if
(
*
psz_check
!=
':'
&&
*
psz_check
!=
'-'
&&
*
psz_check
)
return
;
if
(
*
psz_check
!=
':'
&&
*
psz_check
!=
'-'
&&
*
psz_check
)
return
;
if
(
*
psz_check
==
':'
&&
++
psz_check
)
if
(
*
psz_check
==
':'
&&
++
psz_check
)
if
(
isdigit
(
*
psz_check
)
)
strtol
(
psz_check
,
&
psz_check
,
0
);
{
if
(
isdigit
(
*
psz_check
)
)
if
(
!
next
(
&
psz_check
))
return
;
}
if
(
*
psz_check
!=
'-'
&&
*
psz_check
)
return
;
if
(
*
psz_check
!=
'-'
&&
*
psz_check
)
return
;
if
(
*
psz_check
==
'-'
&&
++
psz_check
)
if
(
*
psz_check
==
'-'
&&
++
psz_check
)
if
(
isdigit
(
*
psz_check
)
)
strtol
(
psz_check
,
&
psz_check
,
0
);
if
(
isdigit
(
*
psz_check
)
)
strtol
(
psz_check
,
&
psz_check
,
0
);
if
(
*
psz_check
!=
':'
&&
*
psz_check
)
return
;
if
(
*
psz_check
!=
':'
&&
*
psz_check
)
return
;
if
(
*
psz_check
==
':'
&&
++
psz_check
)
if
(
*
psz_check
==
':'
&&
++
psz_check
)
if
(
isdigit
(
*
psz_check
)
)
strtol
(
psz_check
,
&
psz_check
,
0
);
{
if
(
isdigit
(
*
psz_check
)
)
if
(
!
next
(
&
psz_check
))
return
;
}
if
(
*
psz_check
)
return
;
if
(
*
psz_check
)
return
;
/* Separate start and end */
/* Separate start and end */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment