mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 527400 - Fix OOM null deref from bug 514872, r=jwalden+bmo, a=beltzner
--HG-- extra : rebase_source : 43a222a11bf131b8ef2420ef2d657c84ba452bb3
This commit is contained in:
parent
9fc75352b9
commit
e37068a79b
@ -422,9 +422,9 @@ ns_WildCardMatch(const T *str, const T *xp, PRBool case_insensitive)
|
||||
return _shexp_match(str, xp, case_insensitive, 0);
|
||||
|
||||
expr = (T *) NS_Alloc((nsCharTraits<T>::length(xp) + 1) * sizeof(T));
|
||||
memcpy(expr, xp, (nsCharTraits<T>::length(xp) + 1) * sizeof(T));
|
||||
if(!expr)
|
||||
return NOMATCH;
|
||||
memcpy(expr, xp, (nsCharTraits<T>::length(xp) + 1) * sizeof(T));
|
||||
|
||||
x = ::_scan_and_copy(expr, T('~'), T('\0'), static_cast<T*>(NULL));
|
||||
if (x != ABORTED && expr[x] == '~') {
|
||||
|
Loading…
Reference in New Issue
Block a user