Alexandre Julliard : dwrite: Avoid wcsncpy().

Alexandre Julliard julliard at winehq.org
Tue May 4 16:23:35 CDT 2021


Module: wine
Branch: master
Commit: 4da6dc6384b717b1cc146f38b18b3e9ca4ec3270
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4da6dc6384b717b1cc146f38b18b3e9ca4ec3270

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue May  4 21:18:55 2021 +0200

dwrite: Avoid wcsncpy().

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dwrite/opentype.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c
index 717550acf38..d7f8701fbbe 100644
--- a/dlls/dwrite/opentype.c
+++ b/dlls/dwrite/opentype.c
@@ -2649,8 +2649,7 @@ HRESULT opentype_get_font_facename(struct file_stream_desc *stream_desc, WCHAR *
             {
                 *nameW = 0;
                 IDWriteLocalizedStrings_GetString(lfnames, index, nameW, length + 1);
-                wcsncpy(lfname, nameW, LF_FACESIZE);
-                lfname[LF_FACESIZE-1] = 0;
+                lstrcpynW(lfname, nameW, LF_FACESIZE);
                 heap_free(nameW);
             }
         }




More information about the wine-cvs mailing list