mirror of
https://github.com/reactos/reactos.git
synced 2025-07-05 03:41:21 +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)))
|
||||
goto end;
|
||||
|
||||
urlComponents.dwSchemeLength = urlLength*sizeof(WCHAR);
|
||||
urlComponents.lpszScheme = malloc(urlComponents.dwSchemeLength);
|
||||
urlComponents.dwHostNameLength = urlLength*sizeof(WCHAR);
|
||||
urlComponents.lpszHostName = malloc(urlComponents.dwHostNameLength);
|
||||
urlLength /= sizeof(WCHAR);
|
||||
urlComponents.dwSchemeLength = urlLength + 1;
|
||||
urlComponents.lpszScheme = malloc(urlComponents.dwSchemeLength * sizeof(WCHAR));
|
||||
urlComponents.dwHostNameLength = urlLength + 1;
|
||||
urlComponents.lpszHostName = malloc(urlComponents.dwHostNameLength * sizeof(WCHAR));
|
||||
|
||||
if(!InternetCrackUrlW(AppInfo->szUrlDownload, urlLength+1, ICU_DECODE | ICU_ESCAPE, &urlComponents))
|
||||
goto end;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue