mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 02:19:47 +00:00
hhctrl.ocx: Handle only the number of bytes given in html_fragment_len.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39699 Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
beb1314307
commit
e3b2863148
|
@ -1898,14 +1898,14 @@ WCHAR *decode_html(const char *html_fragment, int html_fragment_len, UINT code_p
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
symbol = 0;
|
symbol = 0;
|
||||||
amp = strchr(h, '&');
|
amp = memchr(h, '&', html_fragment + html_fragment_len - h);
|
||||||
if(!amp) break;
|
if(!amp) break;
|
||||||
len = amp-h;
|
len = amp-h;
|
||||||
/* Copy the characters prior to the HTML encoded character */
|
/* Copy the characters prior to the HTML encoded character */
|
||||||
memcpy(&tmp[tmp_len], h, len);
|
memcpy(&tmp[tmp_len], h, len);
|
||||||
tmp_len += len;
|
tmp_len += len;
|
||||||
amp++; /* skip ampersand */
|
amp++; /* skip ampersand */
|
||||||
sem = strchr(amp, ';');
|
sem = memchr(amp, ';', html_fragment + html_fragment_len - amp);
|
||||||
/* Require a semicolon after the ampersand */
|
/* Require a semicolon after the ampersand */
|
||||||
if(!sem)
|
if(!sem)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue