summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-08-19 13:26:34 +1000
committerAndrew Bartlett <abartlet@samba.org>2009-08-21 17:50:50 +1000
commitc49145b1ab18bd859ce925b08e9698d9218f6de8 (patch)
tree5f06b9b08f977318555223b73b8c85b75638368a /source4
parent29ef1b2325ac5b80a52abfbd30346636695f4247 (diff)
downloadsamba-c49145b1ab18bd859ce925b08e9698d9218f6de8.tar.gz
samba-c49145b1ab18bd859ce925b08e9698d9218f6de8.tar.bz2
samba-c49145b1ab18bd859ce925b08e9698d9218f6de8.zip
s4:ldb Use length-limited printf to avoid walking off end of strings
This should ensure the debug messages do not have random characters at their ends. Andrew Bartlett
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/common/attrib_handlers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/attrib_handlers.c b/source4/lib/ldb/common/attrib_handlers.c
index 3ea9857d52..53795fdbd3 100644
--- a/source4/lib/ldb/common/attrib_handlers.c
+++ b/source4/lib/ldb/common/attrib_handlers.c
@@ -62,7 +62,7 @@ int ldb_handler_fold(struct ldb_context *ldb, void *mem_ctx,
out->data = (uint8_t *)ldb_casefold(ldb, mem_ctx, (const char *)(in->data), in->length);
if (out->data == NULL) {
- ldb_debug(ldb, LDB_DEBUG_ERROR, "ldb_handler_fold: unable to casefold string [%s]", in->data);
+ ldb_debug(ldb, LDB_DEBUG_ERROR, "ldb_handler_fold: unable to casefold string [%.*s]", (int)in->length, (const char *)in->data);
return -1;
}