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=3528fe345c66dc8cb8a591594dfa53d57b366499

commit 3528fe345c66dc8cb8a591594dfa53d57b366499
Author: Guillem Jover <[email protected]>
AuthorDate: Thu Feb 7 22:36:11 2019 +0100

    libdpkg: Use va_arg copy instead of the original on a vasprintf() call
    
    We need to do that, as we might try to use args again when constructing
    the error message into the emergency buffer, which would get garbage
    instead.
---
 debian/changelog   | 1 +
 lib/dpkg/ehandle.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index c8ca1b00c..e8ba19d75 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -57,6 +57,7 @@ dpkg (1.19.5) UNRELEASED; urgency=medium
     - libdpkg: Add new dpkg_error_move() function.
     - libdpkg: Add new dpkg_has_error() function.
     - libdpkg: Move status names from parse errors to arguments.
+    - libdpkg: Use va_arg copy instead of the original on a vasprintf() call.
   * Build system:
     - Check whether this dist is a release, based only on the version format.
       This will avoid having to do a two staged release to get a proper perl
diff --git a/lib/dpkg/ehandle.c b/lib/dpkg/ehandle.c
index 81ce47e31..e525db003 100644
--- a/lib/dpkg/ehandle.c
+++ b/lib/dpkg/ehandle.c
@@ -190,7 +190,7 @@ error_context_errmsg_format(const char *fmt, va_list args)
   int rc;
 
   va_copy(args_copy, args);
-  rc = vasprintf(&errmsg, fmt, args);
+  rc = vasprintf(&errmsg, fmt, args_copy);
   va_end(args_copy);
 
   /* If the message was constructed successfully, at least we have some

-- 
Dpkg.Org's dpkg

Reply via email to