mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-11 16:29:42 +00:00
btrfs-progs: image: fix non-printable characters in generated file names
Function find_collision sometimes generated file names with non-printable DEL characters (code 127), for example file name "|5gp!" would be changed to "U'2<DEL>y" when using "crc-collisions" sanitize mode. Author: Piotr Pawlow <pp@siedziba.pl> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
c5b6e3fad8
commit
658e7b897b
@ -387,12 +387,12 @@ static char *find_collision(struct metadump_struct *md, char *name,
|
||||
break;
|
||||
}
|
||||
|
||||
if (val->sub[i] == 127) {
|
||||
if (val->sub[i] == 126) {
|
||||
do {
|
||||
i++;
|
||||
if (i >= name_len)
|
||||
break;
|
||||
} while (val->sub[i] == 127);
|
||||
} while (val->sub[i] == 126);
|
||||
|
||||
if (i >= name_len)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user