SHA256
1
0
forked from pool/krb5
krb5/krb5-1.5.1-fix-strncat-warning.dif

21 lines
609 B
Plaintext
Raw Normal View History

--- src/lib/krb4/g_cnffile.c
+++ src/lib/krb4/g_cnffile.c 2006/10/30 11:12:26
@@ -68,7 +68,7 @@
&full_name);
if (retval == 0 && full_name && full_name[0]) {
retname[0] = '\0';
- strncat(retname, full_name[0], sizeof(retname));
+ strncat(retname, full_name[0], sizeof(retname)-strlen(retname)-1);
for (cpp = full_name; *cpp; cpp++)
krb5_xfree(*cpp);
krb5_xfree(full_name);
@@ -76,7 +76,7 @@
}
}
retname[0] = '\0';
- strncat(retname, default_srvtabname, sizeof(retname));
+ strncat(retname, default_srvtabname, sizeof(retname)-strlen(retname)-1);
return retname;
}