Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
714e807a
Commit
714e807a
authored
Mar 28, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Mar 31, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Check against a null dereference and don't read beyond the end of file.
parent
ae1791b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
mpegsplit.c
dlls/quartz/mpegsplit.c
+9
-7
No files found.
dlls/quartz/mpegsplit.c
View file @
714e807a
...
...
@@ -370,8 +370,12 @@ fail:
FIXME
(
"Failed with hres: %08x!
\n
"
,
hr
);
This
->
skipbytes
+=
This
->
remaining_bytes
;
This
->
remaining_bytes
=
0
;
IMediaSample_Release
(
This
->
pCurrentSample
);
This
->
pCurrentSample
=
NULL
;
if
(
This
->
pCurrentSample
)
{
IMediaSample_SetActualDataLength
(
This
->
pCurrentSample
,
0
);
IMediaSample_Release
(
This
->
pCurrentSample
);
This
->
pCurrentSample
=
NULL
;
}
}
if
(
BYTES_FROM_MEDIATIME
(
tStop
)
>=
This
->
EndOfFile
)
...
...
@@ -647,6 +651,7 @@ static HRESULT MPEGSplitter_pre_connect(IPin *iface, IPin *pConnectPin)
while
(
pos
<
This
->
EndOfFile
&&
SUCCEEDED
(
hr
))
{
LONGLONG
length
=
0
;
hr
=
IAsyncReader_SyncRead
(
pPin
->
pReader
,
pos
,
4
,
header
);
while
(
parse_header
(
header
,
&
length
,
&
duration
))
{
/* No valid header yet; shift by a byte and check again */
...
...
@@ -655,11 +660,8 @@ static HRESULT MPEGSplitter_pre_connect(IPin *iface, IPin *pConnectPin)
if
(
FAILED
(
hr
))
break
;
}
if
(
SUCCEEDED
(
hr
))
{
pos
+=
length
;
hr
=
IAsyncReader_SyncRead
(
pPin
->
pReader
,
pos
,
4
,
header
);
}
pos
+=
length
;
TRACE
(
"Pos: %x%08x/%x%08x
\n
"
,
(
DWORD
)(
pos
>>
32
),
(
DWORD
)
pos
,
(
DWORD
)(
This
->
EndOfFile
>>
32
),
(
DWORD
)
This
->
EndOfFile
);
}
hr
=
S_OK
;
TRACE
(
"Duration: %d seconds
\n
"
,
(
DWORD
)(
duration
/
10000000
));
...
...
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