msg/Pipe: make banner buffer slightly bigger

CID 717023: Out-of-bounds access (OVERRUN_DYNAMIC)
At (4): Allocating insufficient memory for the terminating null of the string.

This appears to be a false positive (we don't interpret the buffer as a
string, ever), but it will make coverity happier.

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2012-08-24 19:47:44 -07:00
parent b960c6238c
commit ec5133b09c

View File

@ -594,7 +594,7 @@ int Pipe::connect()
struct msghdr msg;
struct iovec msgvec[2];
int msglen;
char banner[strlen(CEPH_BANNER)];
char banner[strlen(CEPH_BANNER) + 1]; // extra byte makes coverity happy
entity_addr_t paddr;
entity_addr_t peer_addr_for_me, socket_addr;
AuthAuthorizer *authorizer = NULL;