Re: [PATCH v3 0/3] MR1825: kernelbase/path.c: UrlFixupW()
18 Dec
2022
18 Dec
'22
11:28 p.m.
Zebediah Figura (@zfigura) commented about dlls/kernelbase/path.c:
- srcLen = lstrlenW(url) + 1; + /* + * First check for known, valid and typo free scheme + */ + for (pos=1; pos<ARRAY_SIZE(url_scheme); pos++) + { + len = wcslen(url_scheme[pos]); + if ( (len <= wcslen(url)) && (!_wcsnicmp(url, url_scheme[pos], len)) ) + { + /* + * check if string fits into maxChars + */ + if (len+1 >= maxChars) + return S_FALSE; + + lstrcpynW(save_str, url_scheme[pos], len+1); We already know it fits, so this can just be memcpy().
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1825#note_19807
1099
Age (days ago)
1099
Last active (days ago)
0 comments
1 participants
participants (1)
-
Zebediah Figura (@zfigura)