Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8e9d7b03
Commit
8e9d7b03
authored
Oct 06, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Handle zero-length reads in src_getrange_cb().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
240e0d1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
wg_parser.c
dlls/winegstreamer/wg_parser.c
+11
-1
No files found.
dlls/winegstreamer/wg_parser.c
View file @
8e9d7b03
...
...
@@ -1272,7 +1272,7 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
GstMapInfo
map_info
;
bool
ret
;
GST_LOG
(
"pad %p, offset %"
G_GINT64_MODIFIER
"u,
length
%u, buffer %p."
,
pad
,
offset
,
size
,
*
buffer
);
GST_LOG
(
"pad %p, offset %"
G_GINT64_MODIFIER
"u,
size
%u, buffer %p."
,
pad
,
offset
,
size
,
*
buffer
);
if
(
offset
==
GST_BUFFER_OFFSET_NONE
)
offset
=
parser
->
next_pull_offset
;
...
...
@@ -1281,6 +1281,16 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
if
(
!*
buffer
)
*
buffer
=
new_buffer
=
gst_buffer_new_and_alloc
(
size
);
if
(
!
size
)
{
/* asfreader occasionally asks for zero bytes. gst_buffer_map() will
* return NULL in this case. Avoid confusing the read thread by asking
* it for zero bytes. */
gst_buffer_set_size
(
*
buffer
,
0
);
GST_LOG
(
"Returning empty buffer."
);
return
GST_FLOW_OK
;
}
gst_buffer_map
(
*
buffer
,
&
map_info
,
GST_MAP_WRITE
);
pthread_mutex_lock
(
&
parser
->
mutex
);
...
...
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