The following commit has been merged in the master branch:
commit 43789e59f08dae79b07feb004c0fa1b5d357b47d
Author: Guillem Jover <[email protected]>
Date:   Sat Oct 16 05:55:33 2010 +0200

    libdpkg: Make run_error_handler cope with NULL econtext gracefully
    
    This could happen if the context has not been initialized, or if it has
    been unwinded more than necessary.

diff --git a/lib/dpkg/ehandle.c b/lib/dpkg/ehandle.c
index 09b1a77..093e6f6 100644
--- a/lib/dpkg/ehandle.c
+++ b/lib/dpkg/ehandle.c
@@ -97,6 +97,12 @@ run_error_handler(void)
     fprintf(stderr, _("%s: unrecoverable fatal error, aborting:\n %s\n"),
             thisname, errmsg);
     exit(2);
+  }
+
+  if (econtext == NULL) {
+    fprintf(stderr, _("%s: outside error context, aborting:\n %s\n"),
+            thisname, errmsg);
+    exit(2);
   } else {
     longjmp(*econtext->jump, 1);
   }

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to