From: Florian Forster Date: Sat, 26 Jan 2008 13:00:02 +0000 (+0100) Subject: src/liboping.c: Return the number of bytes actually required to store the username X-Git-Tag: Net-Oping-1.00~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6a80978c319f04a73f3aa8303f697705cf753898;p=liboping.git src/liboping.c: Return the number of bytes actually required to store the username Including the terminating NULL-byte. --- diff --git a/src/liboping.c b/src/liboping.c index 17071fd..0371f15 100644 --- a/src/liboping.c +++ b/src/liboping.c @@ -1269,7 +1269,7 @@ int ping_iterator_get_info (pingobj_iter_t *iter, int info, { case PING_INFO_USERNAME: ret = ENOMEM; - *buffer_len = strlen (iter->username); + *buffer_len = strlen (iter->username) + 1; if (orig_buffer_len <= *buffer_len) break; /* Since (orig_buffer_len > *buffer_len) `strncpy'