]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mount.ceph.c: ensure '\0' terminated string
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 2 Oct 2014 08:48:25 +0000 (10:48 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 8 Oct 2014 20:56:22 +0000 (22:56 +0200)
commit46692332db10ae06dbb1be20a390c260c00e1252
tree1433c68a17801dce5e3143521156f5c7eccd5ca0
parent0bbd879841f7b54374c63477e8cf1e82d1740dde
mount.ceph.c: ensure '\0' terminated string

Reserve last char in array for '\0' to ensure termination
of the string.

Fix for:

CID 1128383 (#1 of 1): Buffer not null terminated (BUFFER_SIZE_WARNING)
 buffer_size_warning: Calling strncpy with a maximum size argument
 of 1000 bytes on destination array secret of size 1000 bytes might
 leave the destination string unterminated.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/mount/mount.ceph.c