From: Trond Myklebust Date: Mon, 28 Oct 2013 22:18:00 +0000 (-0400) Subject: SUNRPC: Fix buffer overflow checking in gss_encode_v0_msg/gss_encode_v1_msg X-Git-Tag: omap-for-v3.13/fixes-for-merge-window-take2~60^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d3a2260f0f4bd6379b0a0f131c743fff25b0029;p=pandora-kernel.git SUNRPC: Fix buffer overflow checking in gss_encode_v0_msg/gss_encode_v1_msg In gss_encode_v1_msg, it is pointless to BUG() after the overflow has happened. Replace the existing sprintf()-based code with scnprintf(), and warn if an overflow is ever triggered. In gss_encode_v0_msg, replace the runtime BUG_ON() with an appropriate compile-time BUILD_BUG_ON. Reported-by: Bruce Fields Signed-off-by: Trond Myklebust --- Reading git-diff-tree failed