This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=298e8338826cd7cf7c2fb49f5bb78b014ca9e4e0 commit 298e8338826cd7cf7c2fb49f5bb78b014ca9e4e0 Author: Guillem Jover <[email protected]> AuthorDate: Sat Mar 19 19:46:02 2022 +0100 dpkg-deb: Move duped control member check inside the detection conditional This move the check closer to where the control member is being handled, and will make possible to perform further refactoring. --- src/deb/extract.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/deb/extract.c b/src/deb/extract.c index a1b2dc0bf..a23cd4cb2 100644 --- a/src/deb/extract.c +++ b/src/deb/extract.c @@ -185,6 +185,11 @@ extracthalf(const char *debar, const char *dir, ohshit(_("archive '%s' uses unknown compression for member '%.*s', " "giving up"), debar, (int)sizeof(arh.ar_name), arh.ar_name); + + if (ctrllennum != 0) + ohshit(_("archive '%.250s' contains two control members, giving up"), + debar); + ctrllennum = memberlen; } else { if (adminmember != 1) ohshit(_("archive '%s' has premature member '%.*s' before '%s', " @@ -206,12 +211,6 @@ extracthalf(const char *debar, const char *dir, debar, (int)sizeof(arh.ar_name), arh.ar_name, DATAMEMBER); } } - if (adminmember == 1) { - if (ctrllennum != 0) - ohshit(_("archive '%.250s' contains two control members, giving up"), - debar); - ctrllennum= memberlen; - } if (!adminmember != !admininfo) { if (fd_skip(ar->fd, memberlen + (memberlen & 1), &err) < 0) ohshit(_("cannot skip archive member from '%s': %s"), ar->name, err.str); -- Dpkg.Org's dpkg

