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
a0aaa655
Commit
a0aaa655
authored
Aug 21, 2009
by
Andrew Eikum
Committed by
Alexandre Julliard
Aug 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Don't read past the end of the stream when converting block types.
parent
bfe83b22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
storage32.c
dlls/ole32/storage32.c
+5
-4
No files found.
dlls/ole32/storage32.c
View file @
a0aaa655
...
...
@@ -3563,7 +3563,7 @@ BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks(
{
resRead
=
SmallBlockChainStream_ReadAt
(
*
ppsbChain
,
offset
,
This
->
smallBlockSize
,
min
(
This
->
smallBlockSize
,
size
.
u
.
LowPart
-
offset
.
u
.
LowPart
)
,
buffer
,
&
cbRead
);
if
(
FAILED
(
resRead
))
...
...
@@ -3582,7 +3582,7 @@ BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks(
if
(
FAILED
(
resWrite
))
break
;
offset
.
u
.
LowPart
+=
This
->
smallBlockSize
;
offset
.
u
.
LowPart
+=
cbRead
;
}
}
while
(
cbTotalRead
.
QuadPart
<
size
.
QuadPart
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
...
...
@@ -3663,7 +3663,8 @@ SmallBlockChainStream* Storage32Impl_BigBlocksToSmallBlocks(
do
{
resRead
=
BlockChainStream_ReadAt
(
*
ppbbChain
,
offset
,
This
->
bigBlockSize
,
buffer
,
&
cbRead
);
min
(
This
->
bigBlockSize
,
size
.
u
.
LowPart
-
offset
.
u
.
LowPart
),
buffer
,
&
cbRead
);
if
(
FAILED
(
resRead
))
break
;
...
...
@@ -3678,7 +3679,7 @@ SmallBlockChainStream* Storage32Impl_BigBlocksToSmallBlocks(
if
(
FAILED
(
resWrite
))
break
;
offset
.
u
.
LowPart
+=
This
->
bigBlockSize
;
offset
.
u
.
LowPart
+=
cbRead
;
}
}
while
(
cbTotalRead
.
QuadPart
<
size
.
QuadPart
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
...
...
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