Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
liboggz
Commits
331edd6b
Commit
331edd6b
authored
Jul 16, 2010
by
Timothy B. Terriberry
Committed by
conrad
Jul 17, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix oggz-dump -r segfault when input doesn't exist
The return value of fopen() simply wasn't being checked.
parent
f350abe6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
src/tools/oggz-dump.c
src/tools/oggz-dump.c
+11
-0
No files found.
src/tools/oggz-dump.c
View file @
331edd6b
...
@@ -403,6 +403,17 @@ revert_file (char * infilename)
...
@@ -403,6 +403,17 @@ revert_file (char * infilename)
infile
=
fopen
(
infilename
,
"rb"
);
infile
=
fopen
(
infilename
,
"rb"
);
}
}
if
(
infile
==
NULL
)
{
if
(
errno
==
0
)
{
fprintf
(
stderr
,
"%s: %s: error opening input file
\n
"
,
progname
,
infilename
);
}
else
{
fprintf
(
stderr
,
"%s: %s: %s
\n
"
,
progname
,
infilename
,
strerror
(
errno
));
}
exit
(
1
);
}
oggz
=
oggz_new
(
OGGZ_WRITE
|
OGGZ_NONSTRICT
|
OGGZ_AUTO
);
oggz
=
oggz_new
(
OGGZ_WRITE
|
OGGZ_NONSTRICT
|
OGGZ_AUTO
);
if
(
oggz
==
NULL
)
if
(
oggz
==
NULL
)
exit_out_of_memory
();
exit_out_of_memory
();
...
...
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