summaryrefslogtreecommitdiff
path: root/image/main.c
diff options
context:
space:
mode:
authorPiotr Pawlow <pp@siedziba.pl>2017-08-11 17:11:44 +0200
committerDavid Sterba <dsterba@suse.com>2017-09-25 15:16:54 +0200
commit658e7b897b93df3bad0690169d7cf4c3032ed113 (patch)
tree26ed90edfe87734b57851830bef085fd8f15c91b /image/main.c
parentc5b6e3fad8ea14262c0d2bb7851b0a75298fed6b (diff)
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>
Diffstat (limited to 'image/main.c')
-rw-r--r--image/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/image/main.c b/image/main.c
index 85f2c043..e0c627b0 100644
--- a/image/main.c
+++ b/image/main.c
@@ -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;