diff options
-rw-r--r-- | src/firejail/util.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/firejail/util.c b/src/firejail/util.c index 54e59d7d2..52db987b7 100644 --- a/src/firejail/util.c +++ b/src/firejail/util.c | |||
@@ -1058,20 +1058,19 @@ static void unmangle_path(char *path) { | |||
1058 | worker = p + i; | 1058 | worker = p + i; |
1059 | // there are always three octal digits | 1059 | // there are always three octal digits |
1060 | if (*worker < '0' || *worker > '7') { | 1060 | if (*worker < '0' || *worker > '7') { |
1061 | fprintf(stderr, "Error: bad escape sequence\n"); | 1061 | fprintf(stderr, "Error: cannot read /proc/self/mountinfo\n"); |
1062 | exit(1); | 1062 | exit(1); |
1063 | } | 1063 | } |
1064 | decimal += *worker - '0'; | 1064 | decimal = (*worker - '0' + decimal) * 8; |
1065 | if (i < 3) | ||
1066 | decimal *= 8; | ||
1067 | } | 1065 | } |
1066 | decimal /= 8; | ||
1068 | // do the replacement | 1067 | // do the replacement |
1069 | if (decimal == ' ') { | 1068 | if (decimal == ' ') { |
1070 | *p = ' '; | 1069 | *p = ' '; |
1071 | worker = p; | 1070 | worker = p; |
1072 | do { | 1071 | do { |
1073 | worker++; | 1072 | worker++; |
1074 | *worker = *(worker + 3); | 1073 | *worker = *(worker + 3); |
1075 | } while (*worker); | 1074 | } while (*worker); |
1076 | } | 1075 | } |
1077 | 1076 | ||