diff options
-rw-r--r-- | contrib/untar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/untar.c b/contrib/untar.c index dc092d32..7c34bf71 100644 --- a/contrib/untar.c +++ b/contrib/untar.c @@ -38,7 +38,7 @@ parseoct(const char *p, size_t n) { int i = 0; - while (*p < '0' || *p > '7') { + while ((*p < '0' || *p > '7') && n > 0) { ++p; --n; } |