diff --git a/src/settings.cpp b/src/settings.cpp --- a/src/settings.cpp +++ b/src/settings.cpp @@ -554,7 +554,7 @@ static void ini_save_settings(IniFile *i uint32 i = (uint32)ReadValue(ptr, sld->conv); switch (sdb->cmd) { - case SDT_BOOLX: strcpy(buf, (i != 0) ? "true" : "false"); break; + case SDT_BOOLX: strecpy(buf, (i != 0) ? "true" : "false", lastof(buf)); break; case SDT_NUMX: seprintf(buf, lastof(buf), IsSignedVarMemType(sld->conv) ? "%d" : "%u", i); break; case SDT_ONEOFMANY: make_oneofmany(buf, lastof(buf), sdb->many, i); break; case SDT_MANYOFMANY: make_manyofmany(buf, lastof(buf), sdb->many, i); break; @@ -564,9 +564,9 @@ static void ini_save_settings(IniFile *i case SDT_STRING: switch (GetVarMemType(sld->conv)) { - case SLE_VAR_STRB: strcpy(buf, (char*)ptr); break; + case SLE_VAR_STRB: strecpy(buf, (char*)ptr, lastof(buf)); break; case SLE_VAR_STRBQ:seprintf(buf, lastof(buf), "\"%s\"", (char*)ptr); break; - case SLE_VAR_STR: strcpy(buf, *(char**)ptr); break; + case SLE_VAR_STR: strecpy(buf, *(char**)ptr, lastof(buf)); break; case SLE_VAR_STRQ: if (*(char**)ptr == NULL) { buf[0] = '\0';