From: Michael Schroeder Date: Tue, 1 Sep 2015 11:12:43 +0000 (+0200) Subject: Allow trailings slashes for the filenames in deb packages X-Git-Tag: 0.6.12~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4a87e42d766caa392672b3e10b594ab9e2e6a81;p=thirdparty%2Flibsolv.git Allow trailings slashes for the filenames in deb packages Trailing slashes ar used by sysv ar to allow spaces in filenames... --- diff --git a/ext/repo_deb.c b/ext/repo_deb.c index 26c73b0f..35dcc848 100644 --- a/ext/repo_deb.c +++ b/ext/repo_deb.c @@ -475,7 +475,7 @@ repo_add_deb(Repo *repo, const char *deb, int flags) return 0; } l = fread(buf, 1, sizeof(buf), fp); - if (l < 8 + 60 || strncmp((char *)buf, "!\ndebian-binary ", 8 + 16) != 0) + if (l < 8 + 60 || (strncmp((char *)buf, "!\ndebian-binary ", 8 + 16) != 0 && strncmp((char *)buf, "!\ndebian-binary/ ", 8 + 16) != 0)) { pool_error(pool, -1, "%s: not a deb package", deb); fclose(fp); @@ -495,7 +495,7 @@ repo_add_deb(Repo *repo, const char *deb, int flags) fclose(fp); return 0; } - if (strncmp((char *)buf + 8 + 60 + vlen, "control.tar.gz ", 16) != 0) + if (strncmp((char *)buf + 8 + 60 + vlen, "control.tar.gz ", 16) != 0 && strncmp((char *)buf + 8 + 60 + vlen, "control.tar.gz/ ", 16) != 0) { pool_error(pool, -1, "%s: control.tar.gz is not second entry", deb); fclose(fp);