linux/net/ceph
Cong Ding 1ec3911dbd libceph: fix undefined behavior when using snprintf()
The variable "str" is used as both the source and destination in
function snprintf(), which is undefined behavior based on C11. The
original description in C11 is:
	"If copying takes place between objects that
	overlap, the behavior is undefined."

And, the function of ceph_osdmap_state_str() is to return the osdmap
state, so it should return "doesn't exist" when all the conditions
are not satisfied. I fix it in this patch.

[elder@inktank.com: shortened the commit message]

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Reviewed-by: Alex Elder <elder@inktank.com>
2013-01-25 17:48:59 -06:00
..
crush crush: avoid recursion if we have already collided 2013-01-17 12:42:39 -06:00
armor.c libceph: Fix base64-decoding when input ends in newline. 2011-03-15 09:14:02 -07:00
auth_none.c ceph: messenger: reduce args to create_authorizer 2012-05-17 08:18:12 -05:00
auth_none.h
auth_x_protocol.h
auth_x.c ceph: messenger: reduce args to create_authorizer 2012-05-17 08:18:12 -05:00
auth_x.h net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
auth.c ceph: Move secret key parsing earlier. 2011-03-29 12:11:16 -07:00
buffer.c net: allow GFP_HIGHMEM in __vmalloc() 2010-11-21 10:04:04 -08:00
ceph_common.c libceph: remove 'osdtimeout' option 2012-12-13 08:13:06 -06:00
ceph_fs.c ceph: fix file mode calculation 2011-07-19 11:25:04 -07:00
ceph_hash.c net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
ceph_strings.c
crypto.c libceph: fix crypto key null deref, memory leak 2012-08-02 09:19:20 -07:00
crypto.h libceph: fix crypto key null deref, memory leak 2012-08-02 09:19:20 -07:00
debugfs.c libceph: delay debugfs initialization until we learn global_id 2012-08-20 10:03:15 -07:00
Kconfig ceph: use kernel DNS resolver 2011-10-25 16:10:16 -07:00
Makefile Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-12-08 13:47:38 -08:00
messenger.c libceph: fix protocol feature mismatch failure path 2012-12-27 20:27:04 -06:00
mon_client.c libceph: Fix sparse warning 2012-10-01 14:30:49 -05:00
msgpool.c libceph: initialize msgpool message types 2012-07-30 09:29:50 -07:00
osd_client.c libceph: pass num_op with ops 2013-01-17 16:34:57 -06:00
osdmap.c libceph: fix undefined behavior when using snprintf() 2013-01-25 17:48:59 -06:00
pagelist.c ceph: use list_move_tail instead of list_del/list_add_tail 2012-10-01 14:30:49 -05:00
pagevec.c libceph: fix handling of short returns from get_user_pages 2011-03-03 13:47:39 -08:00