Chameleon

Chameleon Commit Details

Date:2015-03-12 04:36:50 (9 years 1 month ago)
Author:ErmaC
Commit:2620
Parents: 2619
Message:strlcat instead of strcat.
Changes:
M/trunk/i386/modules/Keylayout/Keylayout.c
M/trunk/i386/libsaio/disk.c

File differences

trunk/i386/libsaio/disk.c
18371837
18381838
18391839
1840
1840
1841
1842
18411843
18421844
18431845
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)
{
trunk/i386/modules/Keylayout/Keylayout.c
141141
142142
143143
144
144
145145
146146
147147
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))
{

Archive Download the corresponding diff file

Revision: 2620