fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 13,
"%s: Using DBFPATH = '%s'.\n") ,
aa_argv0, ptr);
- strcpy (full_dbname_old, ptr);
+ snprintf(full_dbname_old, sizeof(full_dbname_old), "%s", ptr);
/* Ensure that DBFPATH ends in a slash. */
ptr = strchr (full_dbname_old, '\0');
"USAGE: %s <dbname>\n"), aa_argv0);
return 2;
}
- sprintf (renamebuf, "%s.d00", argv[1]);
+ snprintf(renamebuf, sizeof(renamebuf), "%s.d00", argv[1]);
db_oflag = O_RDONLY; /* db files may be read-only */
d_open (argv[1], "o");
if (db_status != S_OKAY) {
bad_profile = TRUE;
continue;
}
- strcpy (field_current->text, tok);
+ snprintf(field_current->text, sizeof(field_current->text), "%s", tok);
field_current->text_length = strlen (field_current->text);
/*-- get offset --*/
if (x > 256)
return "";
else if (x < 32) {
- sprintf (buf, "'CTRL-%c'", 0x40 | x);
+ snprintf(buf, sizeof(buf), "'CTRL-%c'", 0x40 | x);
return buf;
}
else if (x >= 128) {
- strcpy (buf, catgets(dtsearch_catd, MS_huff, 32,
+ snprintf(buf, sizeof(buf), "%s", catgets(dtsearch_catd, MS_huff, 32,
"(nonascii char, high bit set)"));
return buf;
}
return FALSE;
}
- strcpy (parsed_dbname, ptr);
+ snprintf(parsed_dbname, sizeof(parsed_dbname), "%s", ptr);
parsed_dblk = usrblk.dblk;
/* Hop over to beginning of 2nd token */