projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00505c9
)
Added strlcpy() since it turns out some krb4-implementations don't include
author
Daniel Stenberg
<daniel@haxx.se>
Tue, 26 Sep 2000 22:28:46 +0000
(22:28 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Tue, 26 Sep 2000 22:28:46 +0000
(22:28 +0000)
their own, even if mine did!
lib/krb4.c
patch
|
blob
|
history
diff --git
a/lib/krb4.c
b/lib/krb4.c
index
79b968c
..
212b095
100644
(file)
--- a/
lib/krb4.c
+++ b/
lib/krb4.c
@@
-72,6
+72,27
@@
struct krb4_data {
char realm[REALM_SZ];
};
+#ifndef HAVE_STRLCPY
+
+size_t
+strlcpy (char *dst, const char *src, size_t dst_sz)
+{
+ size_t n;
+ char *p;
+
+ for (p = dst, n = 0;
+ n + 1 < dst_sz && *src != '\0';
+ ++p, ++src, ++n)
+ *p = *src;
+ *p = '\0';
+ if (*src == '\0')
+ return n;
+ else
+ return n + strlen (src);
+}
+
+#endif
+
static int
krb4_check_prot(void *app_data, int level)
{