frname = XNEWVEC (char, strlen (fname) + dir->len + 2
+ strlen(".framework/") + strlen("PrivateHeaders"));
- strncpy (&frname[0], dir->name, dir->len);
+ memcpy (&frname[0], dir->name, dir->len);
frname_len = dir->len;
if (frname_len && frname[frname_len-1] != '/')
frname[frname_len++] = '/';
- strncpy (&frname[frname_len], fname, fname_len);
+ memcpy (&frname[frname_len], fname, fname_len);
frname_len += fname_len;
- strncpy (&frname[frname_len], ".framework/", strlen (".framework/"));
+ memcpy (&frname[frname_len], ".framework/", strlen (".framework/"));
frname_len += strlen (".framework/");
if (fast_dir == 0)
/* Append framework_header_dirs and header file name */
for (i = 0; framework_header_dirs[i].dirName; i++)
{
- strncpy (&frname[frname_len],
+ memcpy (&frname[frname_len],
framework_header_dirs[i].dirName,
framework_header_dirs[i].dirNameLen);
strcpy (&frname[frname_len + framework_header_dirs[i].dirNameLen],
sfrname_len = bufptr - pname;
- strncpy (&sfrname[0], pname, sfrname_len);
+ memcpy (&sfrname[0], pname, sfrname_len);
- strncpy (&sfrname[sfrname_len], "Frameworks/", strlen ("Frameworks/"));
+ memcpy (&sfrname[sfrname_len], "Frameworks/", strlen ("Frameworks/"));
sfrname_len += strlen("Frameworks/");
- strncpy (&sfrname[sfrname_len], fname, fname_len);
+ memcpy (&sfrname[sfrname_len], fname, fname_len);
sfrname_len += fname_len;
- strncpy (&sfrname[sfrname_len], ".framework/", strlen (".framework/"));
+ memcpy (&sfrname[sfrname_len], ".framework/", strlen (".framework/"));
sfrname_len += strlen (".framework/");
/* Append framework_header_dirs and header file name */
for (i = 0; framework_header_dirs[i].dirName; i++)
{
- strncpy (&sfrname[sfrname_len],
- framework_header_dirs[i].dirName,
- framework_header_dirs[i].dirNameLen);
+ memcpy (&sfrname[sfrname_len],
+ framework_header_dirs[i].dirName,
+ framework_header_dirs[i].dirNameLen);
strcpy (&sfrname[sfrname_len + framework_header_dirs[i].dirNameLen],
&fname[fname_len]);