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
a448bbf8
Commit
a448bbf8
authored
Nov 21, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Reading past end-of-file in chunked mode returns success.
Found by Andrew Eikum.
parent
e8eb7813
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
http.c
dlls/wininet/http.c
+1
-1
http.c
dlls/wininet/tests/http.c
+7
-2
No files found.
dlls/wininet/http.c
View file @
a448bbf8
...
...
@@ -2761,7 +2761,7 @@ static DWORD start_next_chunk(chunked_stream_t *stream, http_request_t *req)
assert
(
!
stream
->
chunk_size
||
stream
->
chunk_size
==
~
0u
);
if
(
stream
->
end_of_data
)
return
ERROR_
NO_MORE_FILE
S
;
if
(
stream
->
end_of_data
)
return
ERROR_
SUCCES
S
;
/* read terminator for the previous chunk */
if
(
!
stream
->
chunk_size
&&
(
res
=
discard_chunked_eol
(
stream
,
req
))
!=
ERROR_SUCCESS
)
...
...
dlls/wininet/tests/http.c
View file @
a448bbf8
...
...
@@ -734,7 +734,7 @@ static void InternetReadFile_chunked_test(void)
{
BOOL
res
;
CHAR
buffer
[
4000
];
DWORD
length
;
DWORD
length
,
got
;
const
char
*
types
[
2
]
=
{
"*"
,
NULL
};
HINTERNET
hi
,
hic
=
0
,
hor
=
0
;
...
...
@@ -814,7 +814,6 @@ static void InternetReadFile_chunked_test(void)
trace
(
"got %u available
\n
"
,
length
);
if
(
length
)
{
DWORD
got
;
char
*
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
length
+
1
);
res
=
InternetReadFile
(
hor
,
buffer
,
length
,
&
got
);
...
...
@@ -828,7 +827,13 @@ static void InternetReadFile_chunked_test(void)
if
(
!
got
)
break
;
}
if
(
length
==
0
)
{
got
=
0xdeadbeef
;
res
=
InternetReadFile
(
hor
,
buffer
,
1
,
&
got
);
ok
(
res
,
"InternetReadFile failed: %u
\n
"
,
GetLastError
()
);
ok
(
!
got
,
"got %u
\n
"
,
got
);
break
;
}
}
abort:
trace
(
"aborting
\n
"
);
...
...
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