svn rev #23355: trunk/src/plugins/kdb/db2/

ghudson@MIT.EDU ghudson at MIT.EDU
Wed Nov 25 09:36:05 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=23355
Commit By: ghudson
Log Message:
In krb5_db2_db_init, make a format string constant to make Coverity
happy.  (Previously it was a disjunction of two constants, which is
fine, but not as obviously safe to a static analysis tool.)



Changed Files:
U   trunk/src/plugins/kdb/db2/kdb_db2.c
Modified: trunk/src/plugins/kdb/db2/kdb_db2.c
===================================================================
--- trunk/src/plugins/kdb/db2/kdb_db2.c	2009-11-25 00:23:57 UTC (rev 23354)
+++ trunk/src/plugins/kdb/db2/kdb_db2.c	2009-11-25 14:36:05 UTC (rev 23355)
@@ -338,9 +338,8 @@
     if ((retval = krb5_db2_db_get_age(context, NULL, &db_ctx->db_lf_time)))
         goto err_out;
 
-    snprintf(policy_db_name, sizeof(policy_db_name),
-             db_ctx->tempdb ? "%s~.kadm5" : "%s.kadm5",
-             db_ctx->db_name);
+    snprintf(policy_db_name, sizeof(policy_db_name), "%s%s.kadm5",
+             db_ctx->db_name, db_ctx->tempdb ? "~" : "");
     snprintf(policy_lock_name, sizeof(policy_lock_name),
              "%s.lock", policy_db_name);
 




More information about the cvs-krb5 mailing list