This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=6e42d508db660f82f58802c10a179819aa8b6103 The following commit(s) were added to refs/heads/master by this push: new 6e42d508d dpkg: Fix off-by-one bug in --abort-after check 6e42d508d is described below commit 6e42d508db660f82f58802c10a179819aa8b6103 (HEAD -> master) Author: Tom Goulet <[email protected]> AuthorDate: Mon Mar 25 12:42:41 2019 +0100 dpkg: Fix off-by-one bug in --abort-after check The code checking whether the amount of errors had been reached, was incrementing the counter after the check, which meant it was allowing one more error than expected. [[email protected]: Move return to the next line. ] Closes: #924886 Signed-off-by: Guillem Jover <[email protected]> --- debian/changelog | 3 ++- src/errors.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 12f746a7a..dad6e37fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ dpkg (1.19.7) UNRELEASED; urgency=medium - * + * dpkg: Fix off-by-one error in dpkg --abort-error. Closes: #924886 + Thanks to Tom Goulet <[email protected]>. -- Guillem Jover <[email protected]> Mon, 25 Mar 2019 15:41:00 +0100 diff --git a/src/errors.c b/src/errors.c index ca405b172..50d41554d 100644 --- a/src/errors.c +++ b/src/errors.c @@ -71,7 +71,8 @@ enqueue_error_report(const char *arg) *lastreport= nr; lastreport= &nr->next; - if (nerrs++ < errabort) return; + if (++nerrs < errabort) + return; notice(_("too many errors, stopping")); abort_processing = true; } -- Dpkg.Org's dpkg

