Message ID | 166922335710.1572664.4478914425268206526.stgit@magnolia (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | xfsprogs: random fixes for 6.1 | expand |
diff --git a/db/write.c b/db/write.c index 70cb0518d01..6c67e839a9e 100644 --- a/db/write.c +++ b/db/write.c @@ -479,7 +479,7 @@ convert_oct( if (arg[count] == '\0') break; - if ((arg[count] < '0') && (arg[count] > '7')) + if ((arg[count] < '0') || (arg[count] > '7')) break; } @@ -553,7 +553,7 @@ convert_arg( /* do octal conversion */ if (*ostr == '\\') { - if (*(ostr + 1) >= '0' || *(ostr + 1) <= '7') { + if (*(ostr + 1) >= '0' && *(ostr + 1) <= '7') { ret = convert_oct(ostr + 1, &octval); *rbuf++ = octval; ostr += ret + 1;