diff --git a/libbb/process_escape_sequence.c b/libbb/process_escape_sequence.c index e6b5fc995..9b57ff99e 100644 --- a/libbb/process_escape_sequence.c +++ b/libbb/process_escape_sequence.c @@ -52,6 +52,8 @@ char bb_process_escape_sequence(const char **ptr) r = n * 16 + hextobin(*q); } else if (isodigit(*q)) { r = n * 8 + octtobin(*q); + } else { + break; } if (r <= UCHAR_MAX) { n = r;