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
b2c80e6b
Commit
b2c80e6b
authored
Apr 17, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Make sure to null terminate buffer in parse_extern_script.
parent
ebaadba4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-1
navigate.c
dlls/mshtml/navigate.c
+2
-1
script.c
dlls/mshtml/script.c
+6
-2
No files found.
dlls/mshtml/mshtml_private.h
View file @
b2c80e6b
...
...
@@ -411,7 +411,7 @@ void set_document_bscallback(HTMLDocument*,nsChannelBSC*);
void
set_current_mon
(
HTMLDocument
*
,
IMoniker
*
);
HRESULT
start_binding
(
HTMLDocument
*
,
BSCallback
*
,
IBindCtx
*
);
HRESULT
bind_mon_to_buffer
(
HTMLDocument
*
,
IMoniker
*
,
void
**
);
HRESULT
bind_mon_to_buffer
(
HTMLDocument
*
,
IMoniker
*
,
void
**
,
DWORD
*
);
nsChannelBSC
*
create_channelbsc
(
IMoniker
*
);
HRESULT
channelbsc_load_stream
(
nsChannelBSC
*
,
IStream
*
);
...
...
dlls/mshtml/navigate.c
View file @
b2c80e6b
...
...
@@ -807,7 +807,7 @@ static BufferBSC *create_bufferbsc(IMoniker *mon)
return
ret
;
}
HRESULT
bind_mon_to_buffer
(
HTMLDocument
*
doc
,
IMoniker
*
mon
,
void
**
buf
)
HRESULT
bind_mon_to_buffer
(
HTMLDocument
*
doc
,
IMoniker
*
mon
,
void
**
buf
,
DWORD
*
size
)
{
BufferBSC
*
bsc
=
create_bufferbsc
(
mon
);
HRESULT
hres
;
...
...
@@ -820,6 +820,7 @@ HRESULT bind_mon_to_buffer(HTMLDocument *doc, IMoniker *mon, void **buf)
if
(
SUCCEEDED
(
hres
))
{
*
buf
=
bsc
->
buf
;
bsc
->
buf
=
NULL
;
*
size
=
bsc
->
bsc
.
readed
;
bsc
->
size
=
0
;
}
}
...
...
dlls/mshtml/script.c
View file @
b2c80e6b
...
...
@@ -477,6 +477,7 @@ static void parse_extern_script(ScriptHost *script_host, LPCWSTR src)
IMoniker
*
mon
;
char
*
buf
;
WCHAR
*
text
;
DWORD
len
,
size
=
0
;
HRESULT
hres
;
static
const
WCHAR
wine_schemaW
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
':'
};
...
...
@@ -488,13 +489,16 @@ static void parse_extern_script(ScriptHost *script_host, LPCWSTR src)
if
(
FAILED
(
hres
))
return
;
hres
=
bind_mon_to_buffer
(
script_host
->
doc
,
mon
,
(
void
**
)
&
buf
);
hres
=
bind_mon_to_buffer
(
script_host
->
doc
,
mon
,
(
void
**
)
&
buf
,
&
size
);
IMoniker_Release
(
mon
);
if
(
FAILED
(
hres
))
return
;
text
=
heap_strdupAtoW
(
buf
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
size
,
NULL
,
0
);
text
=
heap_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
size
,
text
,
len
);
heap_free
(
buf
);
text
[
len
]
=
0
;
parse_text
(
script_host
,
text
);
...
...
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