Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4873dd49
Commit
4873dd49
authored
Nov 12, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Fix checks for digit characters.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b680571a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
18 deletions
+23
-18
editor.c
dlls/mshtml/editor.c
+1
-1
htmlbody.c
dlls/mshtml/htmlbody.c
+1
-1
htmlelem.c
dlls/mshtml/htmlelem.c
+2
-2
htmlelemcol.c
dlls/mshtml/htmlelemcol.c
+1
-1
htmlnode.c
dlls/mshtml/htmlnode.c
+1
-1
htmlselect.c
dlls/mshtml/htmlselect.c
+1
-1
htmlstyle.c
dlls/mshtml/htmlstyle.c
+5
-5
htmltable.c
dlls/mshtml/htmltable.c
+2
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+5
-0
mutation.c
dlls/mshtml/mutation.c
+4
-4
No files found.
dlls/mshtml/editor.c
View file @
4873dd49
...
...
@@ -822,7 +822,7 @@ static HRESULT exec_composesettings(HTMLDocumentNode *doc, DWORD cmdexecopt, VAR
if
(
!
ptr
)
return
S_OK
;
if
(
is
w
digit
(
*++
ptr
))
{
if
(
is
_
digit
(
*++
ptr
))
{
VARIANT
v
;
V_VT
(
&
v
)
=
VT_I4
;
...
...
dlls/mshtml/htmlbody.c
View file @
4873dd49
...
...
@@ -95,7 +95,7 @@ static int comp_value(const WCHAR *ptr, int dpc)
while
(
dpc
--
)
{
if
(
!*
ptr
)
ret
*=
16
;
else
if
(
is
w
digit
(
ch
=
*
ptr
++
))
else
if
(
is
_
digit
(
ch
=
*
ptr
++
))
ret
=
ret
*
16
+
(
ch
-
'0'
);
else
if
(
'a'
<=
ch
&&
ch
<=
'f'
)
ret
=
ret
*
16
+
(
ch
-
'a'
)
+
10
;
...
...
dlls/mshtml/htmlelem.c
View file @
4873dd49
...
...
@@ -700,7 +700,7 @@ static HRESULT HTMLRectCollection_get_dispid(DispatchEx *dispex, BSTR name, DWOR
DWORD
idx
=
0
;
WCHAR
*
ptr
;
for
(
ptr
=
name
;
*
ptr
&&
is
w
digit
(
*
ptr
);
ptr
++
)
for
(
ptr
=
name
;
*
ptr
&&
is
_
digit
(
*
ptr
);
ptr
++
)
idx
=
idx
*
10
+
(
*
ptr
-
'0'
);
if
(
*
ptr
)
return
DISP_E_UNKNOWNNAME
;
...
...
@@ -6061,7 +6061,7 @@ static HRESULT HTMLFiltersCollection_get_dispid(DispatchEx *dispex, BSTR name, D
WCHAR
*
ptr
;
int
idx
=
0
;
for
(
ptr
=
name
;
*
ptr
&&
is
w
digit
(
*
ptr
);
ptr
++
)
for
(
ptr
=
name
;
*
ptr
&&
is
_
digit
(
*
ptr
);
ptr
++
)
idx
=
idx
*
10
+
(
*
ptr
-
'0'
);
if
(
*
ptr
)
return
DISP_E_UNKNOWNNAME
;
...
...
dlls/mshtml/htmlelemcol.c
View file @
4873dd49
...
...
@@ -562,7 +562,7 @@ static HRESULT HTMLElementCollection_get_dispid(DispatchEx *dispex, BSTR name, D
if
(
!*
name
)
return
DISP_E_UNKNOWNNAME
;
for
(
ptr
=
name
;
*
ptr
&&
is
w
digit
(
*
ptr
);
ptr
++
)
for
(
ptr
=
name
;
*
ptr
&&
is
_
digit
(
*
ptr
);
ptr
++
)
idx
=
idx
*
10
+
(
*
ptr
-
'0'
);
if
(
*
ptr
)
{
...
...
dlls/mshtml/htmlnode.c
View file @
4873dd49
...
...
@@ -373,7 +373,7 @@ static HRESULT HTMLDOMChildrenCollection_get_dispid(DispatchEx *dispex, BSTR nam
DWORD
idx
=
0
;
UINT32
len
=
0
;
for
(
ptr
=
name
;
*
ptr
&&
is
w
digit
(
*
ptr
);
ptr
++
)
for
(
ptr
=
name
;
*
ptr
&&
is
_
digit
(
*
ptr
);
ptr
++
)
idx
=
idx
*
10
+
(
*
ptr
-
'0'
);
if
(
*
ptr
)
return
DISP_E_UNKNOWNNAME
;
...
...
dlls/mshtml/htmlselect.c
View file @
4873dd49
...
...
@@ -1190,7 +1190,7 @@ static HRESULT HTMLSelectElement_get_dispid(HTMLDOMNode *iface, BSTR name, DWORD
const
WCHAR
*
ptr
;
DWORD
idx
=
0
;
for
(
ptr
=
name
;
*
ptr
&&
is
w
digit
(
*
ptr
);
ptr
++
)
{
for
(
ptr
=
name
;
*
ptr
&&
is
_
digit
(
*
ptr
);
ptr
++
)
{
idx
=
idx
*
10
+
(
*
ptr
-
'0'
);
if
(
idx
>
MSHTML_CUSTOM_DISPID_CNT
)
{
WARN
(
"too big idx
\n
"
);
...
...
dlls/mshtml/htmlstyle.c
View file @
4873dd49
...
...
@@ -871,7 +871,7 @@ static void fix_px_value(nsAString *nsstr)
if
(
!*
ptr
)
break
;
while
(
*
ptr
&&
is
w
digit
(
*
ptr
))
while
(
*
ptr
&&
is
_
digit
(
*
ptr
))
ptr
++
;
if
(
!*
ptr
||
iswspace
(
*
ptr
))
{
...
...
@@ -1096,7 +1096,7 @@ static HRESULT get_nsstyle_property_var(nsIDOMCSSStyleDeclaration *nsstyle, styl
ptr
++
;
}
while
(
is
w
digit
(
*
ptr
))
while
(
is
_
digit
(
*
ptr
))
i
=
i
*
10
+
(
*
ptr
++
-
'0'
);
if
(
!*
ptr
)
{
...
...
@@ -1228,7 +1228,7 @@ static HRESULT get_nsstyle_pixel_val(HTMLStyle *This, styleid_t sid, LONG *p)
if
(
*
ptr
==
'.'
)
{
/* Skip all digits. We have tests showing that we should not round the value. */
while
(
is
w
digit
(
*++
ptr
));
while
(
is
_
digit
(
*++
ptr
));
}
}
...
...
@@ -2953,11 +2953,11 @@ static void update_filter(HTMLStyle *This)
ptr2
+=
ARRAY_SIZE
(
opacityW
);
while
(
is
w
digit
(
*
ptr2
))
while
(
is
_
digit
(
*
ptr2
))
fval
=
fval
*
10
.
0
f
+
(
float
)(
*
ptr2
++
-
'0'
);
if
(
*
ptr2
==
'.'
)
{
while
(
is
w
digit
(
*++
ptr2
))
{
while
(
is
_
digit
(
*++
ptr2
))
{
fval
+=
e
*
(
float
)(
*
ptr2
++
-
'0'
);
e
*=
0
.
1
f
;
}
...
...
dlls/mshtml/htmltable.c
View file @
4873dd49
...
...
@@ -1021,9 +1021,9 @@ static HRESULT nsstr_to_truncated_bstr(const nsAString *nsstr, BSTR *ret_ptr)
nsAString_GetData
(
nsstr
,
&
str
);
for
(
ptr
=
str
;
is
w
digit
(
*
ptr
);
ptr
++
);
for
(
ptr
=
str
;
is
_
digit
(
*
ptr
);
ptr
++
);
if
(
*
ptr
==
'.'
)
{
for
(
end
=
ptr
++
;
is
w
digit
(
*
ptr
);
ptr
++
);
for
(
end
=
ptr
++
;
is
_
digit
(
*
ptr
);
ptr
++
);
if
(
*
ptr
)
end
=
NULL
;
}
...
...
dlls/mshtml/mshtml_private.h
View file @
4873dd49
...
...
@@ -1363,6 +1363,11 @@ static inline VARIANT_BOOL variant_bool(BOOL b)
return
b
?
VARIANT_TRUE
:
VARIANT_FALSE
;
}
static
inline
BOOL
is_digit
(
WCHAR
c
)
{
return
'0'
<=
c
&&
c
<=
'9'
;
}
#ifdef __i386__
extern
void
*
call_thiscall_func
;
#endif
...
...
dlls/mshtml/mutation.c
View file @
4873dd49
...
...
@@ -109,16 +109,16 @@ static PRUnichar *handle_insert_comment(HTMLDocumentNode *doc, const PRUnichar *
while
(
iswspace
(
*
ptr
))
ptr
++
;
if
(
!
is
w
digit
(
*
ptr
))
if
(
!
is
_
digit
(
*
ptr
))
return
NULL
;
while
(
is
w
digit
(
*
ptr
))
while
(
is
_
digit
(
*
ptr
))
majorv
=
majorv
*
10
+
(
*
ptr
++
-
'0'
);
if
(
*
ptr
==
'.'
)
{
ptr
++
;
if
(
!
is
w
digit
(
*
ptr
))
if
(
!
is
_
digit
(
*
ptr
))
return
NULL
;
while
(
is
w
digit
(
*
ptr
))
while
(
is
_
digit
(
*
ptr
))
minorv
=
minorv
*
10
+
(
*
ptr
++
-
'0'
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment