ChangeSet ID: 21164
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard(a)winehq.org 2005/11/08 06:55:40
Modified files:
dlls/hhctrl.ocx: hhctrl.c
dlls/gdi : font.c
Log message:
Vincent Béron <vberon(a)mecano.gme.usherb.ca>
Correct some allocated buffer lengths while converting to Unicode.
Patch: http://cvs.winehq.org/patch.py?id=21164
Old revision New revision Changes Path
1.10 1.11 +1 -1 wine/dlls/hhctrl.ocx/hhctrl.c
1.24 1.25 +9 -11 wine/dlls/gdi/font.c
Index: wine/dlls/hhctrl.ocx/hhctrl.c
diff -u -p wine/dlls/hhctrl.ocx/hhctrl.c:1.10 wine/dlls/hhctrl.ocx/hhctrl.c:1.11
--- wine/dlls/hhctrl.ocx/hhctrl.c:1.10 8 Nov 2005 12:55:40 -0000
+++ wine/dlls/hhctrl.ocx/hhctrl.c 8 Nov 2005 12:55:40 -0000
@@ -111,7 +111,7 @@ HWND WINAPI HtmlHelpA(HWND caller, LPCST
{
DWORD len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 );
- wfile = HeapAlloc( GetProcessHeap(), 0, (len+1) * sizeof(WCHAR));
+ wfile = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR));
MultiByteToWideChar( CP_ACP, 0, filename, -1, wfile, len );
}
Index: wine/dlls/gdi/font.c
diff -u -p wine/dlls/gdi/font.c:1.24 wine/dlls/gdi/font.c:1.25
--- wine/dlls/gdi/font.c:1.24 8 Nov 2005 12:55:40 -0000
+++ wine/dlls/gdi/font.c 8 Nov 2005 12:55:40 -0000
@@ -344,15 +344,14 @@ static void FONT_NewTextMetricExWToA(con
/***********************************************************************
* FONT_mbtowc
*
- * Returns a '\0' terminated Unicode translation of str using the
- * charset of the currently selected font in hdc. If count is -1 then
- * str is assumed to be '\0' terminated, otherwise it contains the
- * number of bytes to convert. If plenW is non-NULL, on return it
- * will point to the number of WCHARs (excluding the '\0') that have
- * been written. If pCP is non-NULL, on return it will point to the
- * codepage used in the conversion.
- * The caller should free the returned LPWSTR from the process
- * heap itself.
+ * Returns a Unicode translation of str using the charset of the
+ * currently selected font in hdc. If count is -1 then str is assumed
+ * to be '\0' terminated, otherwise it contains the number of bytes to
+ * convert. If plenW is non-NULL, on return it will point to the
+ * number of WCHARs that have been written. If pCP is non-NULL, on
+ * return it will point to the codepage used in the conversion. The
+ * caller should free the returned LPWSTR from the process heap
+ * itself.
*/
static LPWSTR FONT_mbtowc(HDC hdc, LPCSTR str, INT count, INT *plenW, UINT *pCP)
{
@@ -401,9 +400,8 @@ static LPWSTR FONT_mbtowc(HDC hdc, LPCST
if(count == -1) count = strlen(str);
lenW = MultiByteToWideChar(cp, 0, str, count, NULL, 0);
- strW = HeapAlloc(GetProcessHeap(), 0, (lenW + 1) * sizeof(WCHAR));
+ strW = HeapAlloc(GetProcessHeap(), 0, lenW*sizeof(WCHAR));
MultiByteToWideChar(cp, 0, str, count, strW, lenW);
- strW[lenW] = '\0';
TRACE("mapped %s -> %s\n", debugstr_an(str, count), debugstr_wn(strW, lenW));
if(plenW) *plenW = lenW;
if(pCP) *pCP = cp;
ChangeSet ID: 21161
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard(a)winehq.org 2005/11/08 06:46:43
Modified files:
dlls/msxml3 : nodemap.c nodelist.c node.c element.c domdoc.c
Log message:
Huw Davies <huw(a)codeweavers.com>
Fix cut-n-paste error in licence text.
Patch: http://cvs.winehq.org/patch.py?id=21161
Old revision New revision Changes Path
1.7 1.8 +2 -2 wine/dlls/msxml3/nodemap.c
1.5 1.6 +2 -2 wine/dlls/msxml3/nodelist.c
1.12 1.13 +2 -2 wine/dlls/msxml3/node.c
1.9 1.10 +2 -2 wine/dlls/msxml3/element.c
1.15 1.16 +2 -2 wine/dlls/msxml3/domdoc.c
Index: wine/dlls/msxml3/nodemap.c
diff -u -p wine/dlls/msxml3/nodemap.c:1.7 wine/dlls/msxml3/nodemap.c:1.8
--- wine/dlls/msxml3/nodemap.c:1.7 8 Nov 2005 12:46:43 -0000
+++ wine/dlls/msxml3/nodemap.c 8 Nov 2005 12:46:43 -0000
@@ -3,12 +3,12 @@
*
* Copyright 2005 Mike McCormack
*
- * iface library is free software; you can redistribute it and/or
+ * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * iface library is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
Index: wine/dlls/msxml3/nodelist.c
diff -u -p wine/dlls/msxml3/nodelist.c:1.5 wine/dlls/msxml3/nodelist.c:1.6
--- wine/dlls/msxml3/nodelist.c:1.5 8 Nov 2005 12:46:43 -0000
+++ wine/dlls/msxml3/nodelist.c 8 Nov 2005 12:46:43 -0000
@@ -3,12 +3,12 @@
*
* Copyright 2005 Mike McCormack
*
- * iface library is free software; you can redistribute it and/or
+ * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * iface library is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
Index: wine/dlls/msxml3/node.c
diff -u -p wine/dlls/msxml3/node.c:1.12 wine/dlls/msxml3/node.c:1.13
--- wine/dlls/msxml3/node.c:1.12 8 Nov 2005 12:46:43 -0000
+++ wine/dlls/msxml3/node.c 8 Nov 2005 12:46:43 -0000
@@ -3,12 +3,12 @@
*
* Copyright 2005 Mike McCormack
*
- * iface library is free software; you can redistribute it and/or
+ * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * iface library is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
Index: wine/dlls/msxml3/element.c
diff -u -p wine/dlls/msxml3/element.c:1.9 wine/dlls/msxml3/element.c:1.10
--- wine/dlls/msxml3/element.c:1.9 8 Nov 2005 12:46:43 -0000
+++ wine/dlls/msxml3/element.c 8 Nov 2005 12:46:43 -0000
@@ -3,12 +3,12 @@
*
* Copyright 2005 Mike McCormack
*
- * iface library is free software; you can redistribute it and/or
+ * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * iface library is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
Index: wine/dlls/msxml3/domdoc.c
diff -u -p wine/dlls/msxml3/domdoc.c:1.15 wine/dlls/msxml3/domdoc.c:1.16
--- wine/dlls/msxml3/domdoc.c:1.15 8 Nov 2005 12:46:43 -0000
+++ wine/dlls/msxml3/domdoc.c 8 Nov 2005 12:46:43 -0000
@@ -3,12 +3,12 @@
*
* Copyright 2005 Mike McCormack
*
- * iface library is free software; you can redistribute it and/or
+ * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * iface library is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.