Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
libdvdread
Commits
f5ea9142
Commit
f5ea9142
authored
Jan 15, 2015
by
Steve Dibb
Committed by
Jean-Baptiste Kempf
Jan 21, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for malloc fail before setting buffer
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
05c4e138
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/dvd_reader.c
src/dvd_reader.c
+2
-1
No files found.
src/dvd_reader.c
View file @
f5ea9142
...
...
@@ -1445,7 +1445,6 @@ int DVDISOVolumeInfo( dvd_reader_t *dvd,
}
buffer_base
=
malloc
(
DVD_VIDEO_LB_LEN
+
2048
);
buffer
=
(
unsigned
char
*
)(((
uintptr_t
)
buffer_base
&
~
((
uintptr_t
)
2047
))
+
2048
);
if
(
buffer_base
==
NULL
)
{
fprintf
(
stderr
,
"libdvdread: DVDISOVolumeInfo, failed to "
...
...
@@ -1453,6 +1452,8 @@ int DVDISOVolumeInfo( dvd_reader_t *dvd,
return
-
1
;
}
buffer
=
(
unsigned
char
*
)(((
uintptr_t
)
buffer_base
&
~
((
uintptr_t
)
2047
))
+
2048
);
ret
=
InternalUDFReadBlocksRaw
(
dvd
,
16
,
1
,
buffer
,
0
);
if
(
ret
!=
1
)
{
fprintf
(
stderr
,
"libdvdread: DVDISOVolumeInfo, failed to "
...
...
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