INN commit: trunk/authprogs (ckpasswd.c)

INN Commit rra at isc.org
Sun Jul 2 03:00:07 UTC 2017


    Date: Saturday, July 1, 2017 @ 20:00:07
  Author: eagle
Revision: 10158

Replace xmalloc + strlcpy with xstrndup in ckpasswd

This is equivalent, so may as well use the simpler construct.

Modified:
  trunk/authprogs/ckpasswd.c

------------+
 ckpasswd.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Modified: ckpasswd.c
===================================================================
--- ckpasswd.c	2017-07-01 20:55:59 UTC (rev 10157)
+++ ckpasswd.c	2017-07-02 03:00:07 UTC (rev 10158)
@@ -180,8 +180,7 @@
         dbm_close(database);
         return NULL;
     }
-    password = xmalloc(value.dsize + 1);
-    strlcpy(password, value.dptr, value.dsize + 1);
+    password = xstrndup(value.dptr, value.dsize);
     dbm_close(database);
     return password;
 }



More information about the inn-committers mailing list