Skip to content
Commit 9d3a2260 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

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: default avatarBruce Fields <bfields@fieldses.org>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 5fccc5b5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment