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
1722b1da
Commit
1722b1da
authored
Apr 16, 2014
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dvbinfo: Dereference after NULL check (CID 17248)
parent
1f9cf2f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
examples/dvbinfo/dvbinfo.c
examples/dvbinfo/dvbinfo.c
+18
-8
No files found.
examples/dvbinfo/dvbinfo.c
View file @
1722b1da
...
...
@@ -507,7 +507,7 @@ int main(int argc, char **pp_argv)
{
NULL
,
0
,
NULL
,
0
}
};
#ifdef HAVE_SYS_SOCKET_H
while
((
c
=
getopt_long
(
argc
,
pp_argv
,
"a:d:f:i:
ho
:ms:tu"
,
long_options
,
NULL
))
!=
-
1
)
while
((
c
=
getopt_long
(
argc
,
pp_argv
,
"a:d:f:i:
j:ho:p
:ms:tu"
,
long_options
,
NULL
))
!=
-
1
)
#else
while
((
c
=
getopt_long
(
argc
,
pp_argv
,
"d:f:h"
,
long_options
,
NULL
))
!=
-
1
)
#endif
...
...
@@ -603,17 +603,26 @@ int main(int argc, char **pp_argv)
/* - Statistics */
case
's'
:
{
param
->
b_summary
=
true
;
ssize_t
size
=
ARRAY_SIZE
(
psz_summary_mode
);
for
(
ssize_t
i
=
0
;
i
<
size
;
i
++
)
if
(
optarg
)
{
printf
(
"summary mode %s
\n
"
,
psz_summary_mode
[
i
]
);
if
(
strncmp
(
optarg
,
psz_summary_mode
[
i
],
strlen
(
psz_summary_mode
[
i
]))
==
0
)
ssize_t
size
=
ARRAY_SIZE
(
psz_summary_mode
);
for
(
ssize_t
i
=
0
;
i
<
size
;
i
++
)
{
param
->
summary
.
mode
=
i_summary_mode
[
i
];
break
;
printf
(
"summary mode %s
\n
"
,
psz_summary_mode
[
i
]);
if
(
strncmp
(
optarg
,
psz_summary_mode
[
i
],
strlen
(
psz_summary_mode
[
i
]))
==
0
)
{
param
->
summary
.
mode
=
i_summary_mode
[
i
];
param
->
b_summary
=
true
;
break
;
}
}
}
if
(
!
param
->
b_summary
)
{
fprintf
(
stderr
,
"Option --summary has invalid content %s
\n
"
,
optarg
);
params_free
(
param
);
usage
();
}
break
;
}
case
'j'
:
...
...
@@ -628,6 +637,7 @@ int main(int argc, char **pp_argv)
break
;
case
'p'
:
if
(
optarg
)
{
param
->
summary
.
period
=
strtoll
(
optarg
,
NULL
,
10
);
if
(((
errno
==
ERANGE
)
&&
...
...
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