Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
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
libdvbpsi
Commits
085d158d
Commit
085d158d
authored
Apr 11, 2014
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exampes/dvbinfo/dvbinfo.c: Dereference after NULL (CID 17248)
Use strtoll(optarg, NULL, 10).
parent
99169e7a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
examples/dvbinfo/dvbinfo.c
examples/dvbinfo/dvbinfo.c
+3
-4
No files found.
examples/dvbinfo/dvbinfo.c
View file @
085d158d
...
@@ -124,8 +124,8 @@ static void usage(void)
...
@@ -124,8 +124,8 @@ static void usage(void)
printf
(
" table = tables and descriptors
\n
"
);
printf
(
" table = tables and descriptors
\n
"
);
printf
(
" packet = decode packets and print structs
\n
"
);
printf
(
" packet = decode packets and print structs
\n
"
);
// printf(" wire = print arrival time per packet (wireshark like)\n");
// printf(" wire = print arrival time per packet (wireshark like)\n");
printf
(
"
--summary-file : file to write summary information to (default: stdout)
\n
"
);
printf
(
"
-j |
--summary-file : file to write summary information to (default: stdout)
\n
"
);
printf
(
"
--summary-period : refresh summary file every n milliseconds (default: 1000ms)
\n
"
);
printf
(
"
-p |
--summary-period : refresh summary file every n milliseconds (default: 1000ms)
\n
"
);
#endif
#endif
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
...
@@ -610,8 +610,7 @@ int main(int argc, char **pp_argv)
...
@@ -610,8 +610,7 @@ int main(int argc, char **pp_argv)
case
'p'
:
case
'p'
:
{
{
char
*
end
=
NULL
;
param
->
summary
.
period
=
strtoll
(
optarg
,
NULL
,
10
);
param
->
summary
.
period
=
strtoll
(
optarg
,
&
end
,
10
);
if
(((
errno
==
ERANGE
)
&&
if
(((
errno
==
ERANGE
)
&&
((
param
->
summary
.
period
==
LLONG_MIN
)
||
((
param
->
summary
.
period
==
LLONG_MIN
)
||
(
param
->
summary
.
period
==
LLONG_MAX
)))
||
(
param
->
summary
.
period
==
LLONG_MAX
)))
||
...
...
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