Index: trunk/i386/libsaio/disk.c =================================================================== --- trunk/i386/libsaio/disk.c (revision 2619) +++ trunk/i386/libsaio/disk.c (revision 2620) @@ -1837,7 +1837,9 @@ ret = GetFileInfo(dirSpec, fileSpec, &flags, &time); if (!ret) { - fh = open(strcat(dirSpec, fileSpec), 0); + strlcat(dirSpec, fileSpec, sizeof(dirSpec)); + fh = open(dirSpec,0); + fileSize = file_size(fh); if (fileSize > 0 && fileSize < BVSTRLEN) { Index: trunk/i386/modules/Keylayout/Keylayout.c =================================================================== --- trunk/i386/modules/Keylayout/Keylayout.c (revision 2619) +++ trunk/i386/modules/Keylayout/Keylayout.c (revision 2620) @@ -141,7 +141,7 @@ snprintf(layoutPath, sizeof(layoutPath),"/Extra/Keymaps/%s", val); // Add the extension if needed if (len <= 4 || strncmp(val+len-4,".lyt", sizeof(".lyt")) != 0) - strncat(layoutPath, ".lyt", sizeof(layoutPath) - strlen(layoutPath) - 1); + strlcat(layoutPath, ".lyt", sizeof(layoutPath)); if (!load_keyboard_layout_file(layoutPath)) {