Package: libcap
Severity: important
cap_copy_int() fails in the following trivial test.
============================================================================
#include <assert.h>
#include <stdlib.h>
#include <sys/capability.h>
int main (int argc, char *argv[])
{
cap_t caps, caps2;
ssize_t size, copy_size;
void *buffer;
caps = cap_init ();
assert (caps);
size = cap_size (caps);
assert (size>0 && size<1024);
buffer = malloc (size);
assert (buffer);
copy_size = cap_copy_ext (buffer, caps, size);
assert (copy_size == size);
caps2 = cap_copy_int(buffer);
assert (caps2);
return 0;
}
============================================================================
On closer examination, it seems that libcap/cap_extint.c, line 97 is to
blame. The ! before memcmp is clearly wrong.
Matt
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (650, 'testing'), (600, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.16mars-skas3-v9-pre9
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]