Skip to content

Commit

Permalink
repo_deb: The control file may not have a leading "./". Thanks djszapi!
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Nov 16, 2011
1 parent 7b69005 commit 3200333
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/repo_deb.c
Expand Up @@ -573,15 +573,15 @@ repo_add_debs(Repo *repo, const char **debs, int ndebs, int flags)
for (j = 124; j < 124 + 12; j++)
if (bp[j] >= '0' && bp[j] <= '7')
l2 = l2 * 8 + (bp[j] - '0');
if (!strcmp((char *)bp, "./control"))
if (!strcmp((char *)bp, "./control") || !strcmp((char *)bp, "control"))
break;
l2 = 512 + ((l2 + 511) & ~511);
l -= l2;
bp += l2;
}
if (l <= 512 || l - 512 - l2 <= 0 || l2 <= 0)
{
fprintf(stderr, "%s: control.tar.gz contains no ./control file\n", debs[i]);
fprintf(stderr, "%s: control.tar.gz contains no control file\n", debs[i]);
free(ctar);
continue;
}
Expand Down

0 comments on commit 3200333

Please sign in to comment.