[25852] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

svn rev #25342: trunk/src/lib/gssapi/generic/

daemon@ATHENA.MIT.EDU (hartmans@mit.edu)
Fri Oct 14 11:07:35 2011

Date: Fri, 14 Oct 2011 11:07:01 -0400
From: hartmans@mit.edu
Message-Id: <201110141507.p9EF7104002187@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

http://src.mit.edu/fisheye/changelog/krb5/?cs=25342
Commit By: hartmans
Log Message:
Fix gssapi_strdup


Changed Files:
U   trunk/src/lib/gssapi/generic/gssapi_alloc.h
Modified: trunk/src/lib/gssapi/generic/gssapi_alloc.h
===================================================================
--- trunk/src/lib/gssapi/generic/gssapi_alloc.h	2011-10-14 14:46:57 UTC (rev 25341)
+++ trunk/src/lib/gssapi/generic/gssapi_alloc.h	2011-10-14 15:07:01 UTC (rev 25342)
@@ -10,11 +10,6 @@
 #include "winbase.h"
 #endif
 #include <string.h>
-/*
- * Note that we'll need to do something else if we decide to install
- * this header for mechanisms.
- */
-#include <k5-platform.h>
 
 static inline void
 gssalloc_free(void * value)
@@ -61,10 +56,11 @@
 static inline char *
 gssalloc_strdup(const char *str)
 {
-    int size = strlen(str)+1;
+    size_t size = strlen(str)+1;
     char *copy = gssalloc_malloc(size);
     if (copy) {
-        strlcpy(copy, str, size);
+        memcpy(copy, str, size);
+	copy[size-1] = '\0';
     }
     return copy;
 }

_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post