From 7e315d1103af9248583483da99e96ca339bf2d20 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 11 Apr 2015 15:20:17 +0000 Subject: unsafe string operations replaced with safe wherever possible git-svn-id: http://svn.miranda-ng.org/main/trunk@12768 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/fonts/FontService.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/fonts/FontService.cpp') diff --git a/src/modules/fonts/FontService.cpp b/src/modules/fonts/FontService.cpp index b9dc7b7f32..166110f2a8 100644 --- a/src/modules/fonts/FontService.cpp +++ b/src/modules/fonts/FontService.cpp @@ -91,19 +91,19 @@ int LoadFontserviceModule(void) // create generic fonts FontIDT fontid = { sizeof(fontid) }; strncpy(fontid.dbSettingsGroup, "Fonts", sizeof(fontid.dbSettingsGroup)); - _tcsncpy(fontid.group, LPGENT("General"), SIZEOF(fontid.group)); + _tcsncpy_s(fontid.group, LPGENT("General"), _TRUNCATE); - _tcsncpy(fontid.name, LPGENT("Headers"), SIZEOF(fontid.name)); + _tcsncpy_s(fontid.name, LPGENT("Headers"), _TRUNCATE); fontid.flags = FIDF_APPENDNAME | FIDF_NOAS | FIDF_SAVEPOINTSIZE | FIDF_ALLOWEFFECTS | FIDF_CLASSHEADER; strncpy(fontid.prefix, "Header", SIZEOF(fontid.prefix)); FontRegisterT(&fontid); - _tcsncpy(fontid.name, LPGENT("Generic text"), SIZEOF(fontid.name)); + _tcsncpy_s(fontid.name, LPGENT("Generic text"), _TRUNCATE); fontid.flags = FIDF_APPENDNAME | FIDF_NOAS | FIDF_SAVEPOINTSIZE | FIDF_ALLOWEFFECTS | FIDF_CLASSGENERAL; strncpy(fontid.prefix, "Generic", SIZEOF(fontid.prefix)); FontRegisterT(&fontid); - _tcsncpy(fontid.name, LPGENT("Small text"), SIZEOF(fontid.name)); + _tcsncpy_s(fontid.name, LPGENT("Small text"), _TRUNCATE); fontid.flags = FIDF_APPENDNAME | FIDF_NOAS | FIDF_SAVEPOINTSIZE | FIDF_ALLOWEFFECTS | FIDF_CLASSSMALL; strncpy(fontid.prefix, "Small", SIZEOF(fontid.prefix)); FontRegisterT(&fontid); -- cgit v1.2.3