mirror of
https://github.com/reactos/reactos.git
synced 2025-07-05 16:11:22 +00:00
[RAPPS]
- Fix another potential buffer overflow svn path=/trunk/; revision=69456
This commit is contained in:
parent
aa0a9559ed
commit
89a9c63c2d
1 changed files with 5 additions and 4 deletions
|
@ -408,10 +408,11 @@ ThreadFunc(LPVOID Context)
|
||||||
if(FAILED(StringCbLengthW(AppInfo->szUrlDownload, sizeof(AppInfo->szUrlDownload), &urlLength)))
|
if(FAILED(StringCbLengthW(AppInfo->szUrlDownload, sizeof(AppInfo->szUrlDownload), &urlLength)))
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
urlComponents.dwSchemeLength = urlLength*sizeof(WCHAR);
|
urlLength /= sizeof(WCHAR);
|
||||||
urlComponents.lpszScheme = malloc(urlComponents.dwSchemeLength);
|
urlComponents.dwSchemeLength = urlLength + 1;
|
||||||
urlComponents.dwHostNameLength = urlLength*sizeof(WCHAR);
|
urlComponents.lpszScheme = malloc(urlComponents.dwSchemeLength * sizeof(WCHAR));
|
||||||
urlComponents.lpszHostName = malloc(urlComponents.dwHostNameLength);
|
urlComponents.dwHostNameLength = urlLength + 1;
|
||||||
|
urlComponents.lpszHostName = malloc(urlComponents.dwHostNameLength * sizeof(WCHAR));
|
||||||
|
|
||||||
if(!InternetCrackUrlW(AppInfo->szUrlDownload, urlLength+1, ICU_DECODE | ICU_ESCAPE, &urlComponents))
|
if(!InternetCrackUrlW(AppInfo->szUrlDownload, urlLength+1, ICU_DECODE | ICU_ESCAPE, &urlComponents))
|
||||||
goto end;
|
goto end;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue