mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 19:34:43 +01:00
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:
1 parent
1a7dfcc5a3
commit
e3081f7e3e
1 file changed
+1
-1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298336
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user