summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-08-17 20:29:11 +0200
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-08-17 20:29:11 +0200
commit2cf897b10aa6b0d9565333085477e348261bfb2c (patch)
tree2d5080d7f8ff33b6607f997cc9500264b15b7ac7 /source4/dsdb/samdb
parent87737f8946527ae96cd7fd41b6157c79d7c90964 (diff)
downloadsamba-2cf897b10aa6b0d9565333085477e348261bfb2c.tar.gz
samba-2cf897b10aa6b0d9565333085477e348261bfb2c.tar.bz2
samba-2cf897b10aa6b0d9565333085477e348261bfb2c.zip
s4: Make the int32 problem more clear - and fix another error
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/simple_ldap_map.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
index 8fb639f53f..21b80dccbf 100644
--- a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
+++ b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
@@ -147,6 +147,8 @@ static struct ldb_val objectCategory_always_dn(struct ldb_module *module, TALLOC
static struct ldb_val normalise_to_signed32(struct ldb_module *module, TALLOC_CTX *ctx, const struct ldb_val *val)
{
struct ldb_val out;
+ /* We've to use "strtoll" here to have the intended overflows.
+ * Otherwise we may get "LONG_MAX" and the conversion is wrong. */
int32_t i = (int32_t) strtoll((char *)val->data, NULL, 0);
out = data_blob_string_const(talloc_asprintf(ctx, "%d", i));
return out;