now makes a numbered backup file instead of losing the data.
[the bug dates back to the initial implementation]
+ cp, install, ln, and mv now ignore nonsensical backup suffixes.
+ For example, --suffix='/' and --suffix='' are now no-ops.
+ [the bug dates back to the initial implementation]
+
date and touch no longer overwrite the heap with large
user specified TZ values (CVE-2017-7476).
[bug introduced in coreutils-8.27]
int c;
bool ok;
bool make_backups = false;
+ char const *backup_suffix = NULL;
char *version_control_string = NULL;
struct cp_options x;
bool copy_contents = false;
case 'S':
make_backups = true;
- simple_backup_suffix = optarg;
+ backup_suffix = optarg;
break;
case_GETOPT_HELP_CHAR;
? xget_version (_("backup type"),
version_control_string)
: no_backups);
+ set_simple_backup_suffix (backup_suffix);
if (x.dereference == DEREF_UNDEFINED)
{
int exit_status = EXIT_SUCCESS;
const char *specified_mode = NULL;
bool make_backups = false;
+ char const *backup_suffix = NULL;
char *version_control_string = NULL;
bool mkdir_and_install = false;
struct cp_options x;
break;
case 'S':
make_backups = true;
- simple_backup_suffix = optarg;
+ backup_suffix = optarg;
break;
case 't':
if (target_directory)
? xget_version (_("backup type"),
version_control_string)
: no_backups);
+ set_simple_backup_suffix (backup_suffix);
if (x.preserve_security_context && (x.set_security_context || scontext))
die (EXIT_FAILURE, 0,
int c;
bool ok;
bool make_backups = false;
+ char const *backup_suffix = NULL;
char *version_control_string = NULL;
char const *target_directory = NULL;
bool no_target_directory = false;
break;
case 'S':
make_backups = true;
- simple_backup_suffix = optarg;
+ backup_suffix = optarg;
break;
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
backup_type = (make_backups
? xget_version (_("backup type"), version_control_string)
: no_backups);
+ set_simple_backup_suffix (backup_suffix);
if (relative && !symbolic_link)
{
int c;
bool ok;
bool make_backups = false;
+ char const *backup_suffix = NULL;
char *version_control_string = NULL;
struct cp_options x;
char *target_directory = NULL;
break;
case 'S':
make_backups = true;
- simple_backup_suffix = optarg;
+ backup_suffix = optarg;
break;
case 'Z':
/* As a performance enhancement, don't even bother trying
? xget_version (_("backup type"),
version_control_string)
: no_backups);
+ set_simple_backup_suffix (backup_suffix);
hash_init ();