diff options
-rw-r--r-- | ext/repo_arch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/repo_arch.c b/ext/repo_arch.c index dfa2ac8..5151803 100644 --- a/ext/repo_arch.c +++ b/ext/repo_arch.c @@ -256,7 +256,7 @@ static int gettarhead(struct tarhead *th) memcpy(prefix, th->blk + 345, 155); prefix[155] = 0; l = strlen(prefix); - if (prefix[l - 1] == '/') + if (l && prefix[l - 1] == '/') prefix[l - 1] = 0; th->path = solv_dupjoin(prefix, "/", path); } |