From c2a25909b2c4d989e49cdedcac4dd52c45f0570b Mon Sep 17 00:00:00 2001 From: "Andrew G. Morgan" Date: Thu, 24 Jan 2008 11:14:20 -0800 Subject: Fix malloc(size) but in capsh and numeric capabilities (for unnamed bits) capsh allocated too little memory for the --inh argument - led to glibc aborting with free(). libcap has always had latent support for identifying unnamed capabilities with integers. It was untested (and therefore broken) prior to this commit. Should be fixed now. Signed-off-by: Andrew G. Morgan --- libcap/libcap.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libcap/libcap.h') diff --git a/libcap/libcap.h b/libcap/libcap.h index 854f907..bd22397 100644 --- a/libcap/libcap.h +++ b/libcap/libcap.h @@ -98,6 +98,9 @@ struct _cap_struct { } u[_LINUX_CAPABILITY_U32S]; }; +/* the maximum bits supportable */ +#define __CAP_MAXBITS (__CAP_BLKS * 32) + /* string magic for cap_free */ #define CAP_S_MAGIC 0xCA95D0 -- cgit v1.2.3