|
|
@@ -30,6 +30,7 @@
|
|
|
|
|
|
#include <dpkg.h>
|
|
|
#include <dpkg-db.h>
|
|
|
+#include <dpkg-priv.h>
|
|
|
|
|
|
static const char *errmsg; /* points to errmsgbuf or malloc'd */
|
|
|
static char errmsgbuf[4096];
|
|
|
@@ -188,7 +189,7 @@ void push_cleanup(void (*call1)(int argc, void **argv), int mask1,
|
|
|
|
|
|
cep= malloc(sizeof(struct cleanupentry) + sizeof(char*)*(nargs+1));
|
|
|
if (!cep) {
|
|
|
- if (nargs > sizeof(emergency.args)/sizeof(void*))
|
|
|
+ if (nargs > sizeof_array(emergency.args))
|
|
|
ohshite(_("out of memory for new cleanup entry with many arguments"));
|
|
|
e= errno; cep= &emergency.ce;
|
|
|
}
|