diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-08-25 08:27:06 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-08-25 08:27:06 +1000 |
commit | 9eacc3a8f396e74b0deed193f0f2ecffa3ba8e93 (patch) | |
tree | 28d045a42a9b09b42e34b9009a6635026ff3d9c8 /source4/lib/util | |
parent | 5631ebaf78fee35880aafe29578b8925c655e5f4 (diff) | |
parent | a22b9d648553e5e7e0ee19606d9bceeb3b356241 (diff) | |
download | samba-9eacc3a8f396e74b0deed193f0f2ecffa3ba8e93.tar.gz samba-9eacc3a8f396e74b0deed193f0f2ecffa3ba8e93.tar.bz2 samba-9eacc3a8f396e74b0deed193f0f2ecffa3ba8e93.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-local
(This used to be commit a555334db67527b57bc6172e3d08f65caf1e6760)
Diffstat (limited to 'source4/lib/util')
-rw-r--r-- | source4/lib/util/data_blob.c | 2 | ||||
-rw-r--r-- | source4/lib/util/util_ldb.c | 4 | ||||
-rw-r--r-- | source4/lib/util/util_ldb.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/util/data_blob.c b/source4/lib/util/data_blob.c index b258e47bba..57b34b7ae7 100644 --- a/source4/lib/util/data_blob.c +++ b/source4/lib/util/data_blob.c @@ -176,7 +176,7 @@ _PUBLIC_ DATA_BLOB data_blob_string_const(const char *str) { DATA_BLOB blob; blob.data = discard_const_p(uint8_t, str); - blob.length = strlen(str); + blob.length = str ? strlen(str) : 0; return blob; } diff --git a/source4/lib/util/util_ldb.c b/source4/lib/util/util_ldb.c index 0a7433696e..fab729c036 100644 --- a/source4/lib/util/util_ldb.c +++ b/source4/lib/util/util_ldb.c @@ -125,9 +125,9 @@ int gendb_add_ldif(struct ldb_context *ldb, const char *ldif_string) return ret; } -char *wrap_casefold(void *context, void *mem_ctx, const char *s) +char *wrap_casefold(void *context, void *mem_ctx, const char *s, size_t n) { - return strupper_talloc(mem_ctx, s); + return strupper_talloc_n(mem_ctx, s, n); } diff --git a/source4/lib/util/util_ldb.h b/source4/lib/util/util_ldb.h index 030ba7ebee..43f98ae1a9 100644 --- a/source4/lib/util/util_ldb.h +++ b/source4/lib/util/util_ldb.h @@ -22,6 +22,6 @@ int gendb_search_dn(struct ldb_context *ldb, struct ldb_message ***res, const char * const *attrs); int gendb_add_ldif(struct ldb_context *ldb, const char *ldif_string); -char *wrap_casefold(void *context, void *mem_ctx, const char *s); +char *wrap_casefold(void *context, void *mem_ctx, const char *s, size_t n); #endif /* __LIB_UTIL_UTIL_LDB_H__ */ |