kgssapi(4): Fix string overrun in Kerberos principal construction
'buf.value' was previously treated as a nul-terminated string, but only allocated with strlen() space. Rectify this. Reported by: Coverity CID: 1007639 Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
1a7dfcc5a3
commit
e3081f7e3e
@ -331,7 +331,7 @@ rpc_gss_get_principal_name(rpc_gss_principal_t *principal,
|
||||
* Construct a gss_buffer containing the full name formatted
|
||||
* as "name/node@domain" where node and domain are optional.
|
||||
*/
|
||||
namelen = strlen(name);
|
||||
namelen = strlen(name) + 1;
|
||||
if (node) {
|
||||
namelen += strlen(node) + 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user