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
55b27228
Commit
55b27228
authored
Apr 22, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Use wrappers for HeapReAlloc calls.
parent
d2ff4616
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
ftp.c
dlls/wininet/ftp.c
+2
-4
http.c
dlls/wininet/http.c
+6
-6
No files found.
dlls/wininet/ftp.c
View file @
55b27228
...
@@ -3762,8 +3762,7 @@ static BOOL FTP_ParseDirectory(ftp_session_t *lpwfs, INT nSocket, LPCWSTR lpszSe
...
@@ -3762,8 +3762,7 @@ static BOOL FTP_ParseDirectory(ftp_session_t *lpwfs, INT nSocket, LPCWSTR lpszSe
LPFILEPROPERTIESW
tmpafp
;
LPFILEPROPERTIESW
tmpafp
;
sizeFilePropArray
*=
2
;
sizeFilePropArray
*=
2
;
tmpafp
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
*
lpafp
,
tmpafp
=
heap_realloc_zero
(
*
lpafp
,
sizeof
(
FILEPROPERTIESW
)
*
sizeFilePropArray
);
sizeof
(
FILEPROPERTIESW
)
*
sizeFilePropArray
);
if
(
NULL
==
tmpafp
)
if
(
NULL
==
tmpafp
)
{
{
bSuccess
=
FALSE
;
bSuccess
=
FALSE
;
...
@@ -3781,8 +3780,7 @@ static BOOL FTP_ParseDirectory(ftp_session_t *lpwfs, INT nSocket, LPCWSTR lpszSe
...
@@ -3781,8 +3780,7 @@ static BOOL FTP_ParseDirectory(ftp_session_t *lpwfs, INT nSocket, LPCWSTR lpszSe
{
{
LPFILEPROPERTIESW
tmpafp
;
LPFILEPROPERTIESW
tmpafp
;
tmpafp
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
*
lpafp
,
tmpafp
=
heap_realloc
(
*
lpafp
,
sizeof
(
FILEPROPERTIESW
)
*
indexFilePropArray
);
sizeof
(
FILEPROPERTIESW
)
*
indexFilePropArray
);
if
(
NULL
!=
tmpafp
)
if
(
NULL
!=
tmpafp
)
*
lpafp
=
tmpafp
;
*
lpafp
=
tmpafp
;
}
}
...
...
dlls/wininet/http.c
View file @
55b27228
...
@@ -5359,7 +5359,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear)
...
@@ -5359,7 +5359,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear)
while
(
cchRawHeaders
+
buflen
+
strlenW
(
szCrLf
)
>
cchMaxRawHeaders
)
while
(
cchRawHeaders
+
buflen
+
strlenW
(
szCrLf
)
>
cchMaxRawHeaders
)
cchMaxRawHeaders
*=
2
;
cchMaxRawHeaders
*=
2
;
temp
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
lpszRawHeaders
,
(
cchMaxRawHeaders
+
1
)
*
sizeof
(
WCHAR
));
temp
=
heap_realloc
(
lpszRawHeaders
,
(
cchMaxRawHeaders
+
1
)
*
sizeof
(
WCHAR
));
if
(
temp
==
NULL
)
goto
lend
;
if
(
temp
==
NULL
)
goto
lend
;
lpszRawHeaders
=
temp
;
lpszRawHeaders
=
temp
;
memcpy
(
lpszRawHeaders
+
cchRawHeaders
,
buffer
,
(
buflen
-
1
)
*
sizeof
(
WCHAR
));
memcpy
(
lpszRawHeaders
+
cchRawHeaders
,
buffer
,
(
buflen
-
1
)
*
sizeof
(
WCHAR
));
...
@@ -5386,7 +5386,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear)
...
@@ -5386,7 +5386,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear)
{
{
while
(
cchRawHeaders
+
buflen
+
strlenW
(
szCrLf
)
>
cchMaxRawHeaders
)
while
(
cchRawHeaders
+
buflen
+
strlenW
(
szCrLf
)
>
cchMaxRawHeaders
)
cchMaxRawHeaders
*=
2
;
cchMaxRawHeaders
*=
2
;
temp
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
lpszRawHeaders
,
(
cchMaxRawHeaders
+
1
)
*
sizeof
(
WCHAR
));
temp
=
heap_realloc
(
lpszRawHeaders
,
(
cchMaxRawHeaders
+
1
)
*
sizeof
(
WCHAR
));
if
(
temp
==
NULL
)
goto
lend
;
if
(
temp
==
NULL
)
goto
lend
;
lpszRawHeaders
=
temp
;
lpszRawHeaders
=
temp
;
memcpy
(
lpszRawHeaders
+
cchRawHeaders
,
buffer
,
(
buflen
-
1
)
*
sizeof
(
WCHAR
));
memcpy
(
lpszRawHeaders
+
cchRawHeaders
,
buffer
,
(
buflen
-
1
)
*
sizeof
(
WCHAR
));
...
@@ -5415,7 +5415,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear)
...
@@ -5415,7 +5415,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear)
if
(
cchRawHeaders
+
strlenW
(
szCrLf
)
>
cchMaxRawHeaders
)
if
(
cchRawHeaders
+
strlenW
(
szCrLf
)
>
cchMaxRawHeaders
)
{
{
cchMaxRawHeaders
=
cchRawHeaders
+
strlenW
(
szCrLf
);
cchMaxRawHeaders
=
cchRawHeaders
+
strlenW
(
szCrLf
);
temp
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
lpszRawHeaders
,
(
cchMaxRawHeaders
+
1
)
*
sizeof
(
WCHAR
));
temp
=
heap_realloc
(
lpszRawHeaders
,
(
cchMaxRawHeaders
+
1
)
*
sizeof
(
WCHAR
));
if
(
temp
==
NULL
)
goto
lend
;
if
(
temp
==
NULL
)
goto
lend
;
lpszRawHeaders
=
temp
;
lpszRawHeaders
=
temp
;
}
}
...
@@ -5589,7 +5589,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR
...
@@ -5589,7 +5589,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR
len
=
origlen
+
valuelen
+
((
ch
>
0
)
?
2
:
0
);
len
=
origlen
+
valuelen
+
((
ch
>
0
)
?
2
:
0
);
lpsztmp
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
lphttpHdr
->
lpszValue
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
lpsztmp
=
heap_realloc
(
lphttpHdr
->
lpszValue
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
if
(
lpsztmp
)
if
(
lpsztmp
)
{
{
lphttpHdr
->
lpszValue
=
lpsztmp
;
lphttpHdr
->
lpszValue
=
lpsztmp
;
...
@@ -5608,7 +5608,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR
...
@@ -5608,7 +5608,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR
}
}
else
else
{
{
WARN
(
"
HeapReA
lloc (%d bytes) failed
\n
"
,
len
+
1
);
WARN
(
"
heap_rea
lloc (%d bytes) failed
\n
"
,
len
+
1
);
res
=
ERROR_OUTOFMEMORY
;
res
=
ERROR_OUTOFMEMORY
;
}
}
}
}
...
@@ -5692,7 +5692,7 @@ static DWORD HTTP_InsertCustomHeader(http_request_t *request, LPHTTPHEADERW lpHd
...
@@ -5692,7 +5692,7 @@ static DWORD HTTP_InsertCustomHeader(http_request_t *request, LPHTTPHEADERW lpHd
TRACE
(
"--> %s: %s
\n
"
,
debugstr_w
(
lpHdr
->
lpszField
),
debugstr_w
(
lpHdr
->
lpszValue
));
TRACE
(
"--> %s: %s
\n
"
,
debugstr_w
(
lpHdr
->
lpszField
),
debugstr_w
(
lpHdr
->
lpszValue
));
count
=
request
->
nCustHeaders
+
1
;
count
=
request
->
nCustHeaders
+
1
;
if
(
count
>
1
)
if
(
count
>
1
)
lph
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
request
->
custHeaders
,
sizeof
(
HTTPHEADERW
)
*
count
);
lph
=
heap_realloc_zero
(
request
->
custHeaders
,
sizeof
(
HTTPHEADERW
)
*
count
);
else
else
lph
=
heap_alloc_zero
(
sizeof
(
HTTPHEADERW
)
*
count
);
lph
=
heap_alloc_zero
(
sizeof
(
HTTPHEADERW
)
*
count
);
...
...
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