diff options
author | David Howells <dhowells@redhat.com> | 2014-02-21 14:04:34 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2014-02-21 14:17:27 +0000 |
commit | 50e25867fd567a18a4fd972c97108c14745962e2 (patch) | |
tree | cc9f6ec018f813c99acf1f1629e5de07a21a8416 | |
parent | 00feb366f80b2a56d5941092c697f924c61f056f (diff) | |
download | keyutils-50e25867fd567a18a4fd972c97108c14745962e2.tar.gz |
Revert "Lib: Check the description string is NUL-terminated when retrieved"
This reverts commit ed72a1dfc56a4f5428affb1659d6812d54e392c5.
The problem is that the buffer argument might validly be NULL, leading to a
SEGV when we try to check for the NUL termination.
Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r-- | keyutils.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -110,11 +110,7 @@ long keyctl_setperm(key_serial_t id, key_perm_t perm) long keyctl_describe(key_serial_t id, char *buffer, size_t buflen) { - long ret = keyctl(KEYCTL_DESCRIBE, id, buffer, buflen); - - if (ret == 0 || (ret > 0 && !buffer[ret - 1])) - abort(); - return ret; + return keyctl(KEYCTL_DESCRIBE, id, buffer, buflen); } long keyctl_clear(key_serial_t ringid) |