msxml3: Only allow ASCII characters in number conversion.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-11-27 14:31:40 +01:00
parent b00e2df3e8
commit a75cc9e626
4 changed files with 4 additions and 4 deletions

View File

@ -520,7 +520,7 @@ static inline HRESULT variant_from_dt(XDR_DT dt, xmlChar* str, VARIANT* v)
if(*p == '.')
{
p++;
while(isdigitW(*p)) p++;
while (*p >= '0' && *p <= '9') p++;
}
}

View File

@ -312,7 +312,7 @@ static HRESULT xmlnodelist_get_dispid(IUnknown *iface, BSTR name, DWORD flags, D
WCHAR *ptr;
int idx = 0;
for(ptr = name; *ptr && isdigitW(*ptr); ptr++)
for(ptr = name; *ptr >= '0' && *ptr <= '9'; ptr++)
idx = idx*10 + (*ptr-'0');
if(*ptr)
return DISP_E_UNKNOWNNAME;

View File

@ -371,7 +371,7 @@ static HRESULT xmlnodemap_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DI
WCHAR *ptr;
int idx = 0;
for(ptr = name; *ptr && isdigitW(*ptr); ptr++)
for(ptr = name; *ptr >= '0' && *ptr <= '9'; ptr++)
idx = idx*10 + (*ptr-'0');
if(*ptr)
return DISP_E_UNKNOWNNAME;

View File

@ -595,7 +595,7 @@ static HRESULT domselection_get_dispid(IUnknown *iface, BSTR name, DWORD flags,
WCHAR *ptr;
int idx = 0;
for(ptr = name; *ptr && isdigitW(*ptr); ptr++)
for(ptr = name; *ptr >= '0' && *ptr <= '9'; ptr++)
idx = idx*10 + (*ptr-'0');
if(*ptr)
return DISP_E_UNKNOWNNAME;