projects
/
krb5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix gssapi_strdup
[krb5.git]
/
src
/
lib
/
gssapi
/
generic
/
gssapi_alloc.h
diff --git
a/src/lib/gssapi/generic/gssapi_alloc.h
b/src/lib/gssapi/generic/gssapi_alloc.h
index a192124666208aaa7cb057a75d8ea034ce461bb3..a28533ed4f802b5610adadfa34cb9c14f7aa896e 100644
(file)
--- a/
src/lib/gssapi/generic/gssapi_alloc.h
+++ b/
src/lib/gssapi/generic/gssapi_alloc.h
@@
-10,11
+10,6
@@
#include "winbase.h"
#endif
#include <string.h>
#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)
static inline void
gssalloc_free(void * value)
@@
-61,10
+56,11
@@
gssalloc_realloc(void *value, size_t size)
static inline char *
gssalloc_strdup(const char *str)
{
static inline char *
gssalloc_strdup(const char *str)
{
-
in
t size = strlen(str)+1;
+
size_
t size = strlen(str)+1;
char *copy = gssalloc_malloc(size);
if (copy) {
char *copy = gssalloc_malloc(size);
if (copy) {
- strlcpy(copy, str, size);
+ memcpy(copy, str, size);
+ copy[size-1] = '\0';
}
return copy;
}
}
return copy;
}