summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-20 10:29:54 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-20 10:29:54 +0000
commitd4dfcda78eeca4206965667a45f4f00f4e10457a (patch)
tree952f96c7eef52ad28609d65eef4cb37b1002e191 /source4/lib
parent5d77cda1dccf79356aa8ab3ef3516aa69325e2be (diff)
downloadsamba-d4dfcda78eeca4206965667a45f4f00f4e10457a.tar.gz
samba-d4dfcda78eeca4206965667a45f4f00f4e10457a.tar.bz2
samba-d4dfcda78eeca4206965667a45f4f00f4e10457a.zip
* fixed level2 of QueryUserInfo
* added per-field testing of SetUserInfo * fixed strlen_m() (This used to be commit 26238b0f8a5752bb0f611c4aa492b964e419209a)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/util_str.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c
index b220820104..285b0cc02e 100644
--- a/source4/lib/util_str.c
+++ b/source4/lib/util_str.c
@@ -1074,13 +1074,18 @@ size_t strlen_m(const char *s)
{
size_t count = 0;
+ if (!s) {
+ return 0;
+ }
+
while (*s && !(((unsigned char)s[0]) & 0x7F)) {
s++;
count++;
}
- if (!*s)
- return;
+ if (!*s) {
+ return count;
+ }
push_ucs2(NULL,tmpbuf,s, sizeof(tmpbuf), STR_TERMINATE);
return count + strlen_w(tmpbuf);