Issues with C API image metadata retrieval functions
A couple of issues detected when testing rbd_metadata_list API function:
- the provided parameter `vals_len` is not properly checked;
- the output buffers are expected to be zero pre-filled.
#1 Updated by Mykola Golub over 1 year ago
- Subject changed from rbd_metadata_list API function does not work properly to Issues with C API image metadata retrieval functions
Also, there is an issue with rbd_metadata_get function: on success it does not set update val_len param (which might be ok), but it also does not copy the final '\0' character to the value buffer. As a result the caller can't tell the value length until it pre-fills the buffer with zeros.