diff options
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r-- | source4/lib/ldb/common/attrib_handlers.c | 2 |
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 7d1eff6d9a..ec89bdd1c4 100644 --- a/source4/lib/ldb/common/attrib_handlers.c +++ b/source4/lib/ldb/common/attrib_handlers.c @@ -69,7 +69,7 @@ static int ldb_handler_fold(struct ldb_context *ldb, void *mem_ctx, /* remove trailing spaces if any */ l = strlen(s); - while (s[l - 1] == ' ') l--; + while (l > 0 && s[l - 1] == ' ') l--; s[l] = '\0'; /* remove leading spaces if any */ |