diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-08-17 20:29:11 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-08-17 20:29:11 +0200 |
commit | 2cf897b10aa6b0d9565333085477e348261bfb2c (patch) | |
tree | 2d5080d7f8ff33b6607f997cc9500264b15b7ac7 /source4/dsdb/schema | |
parent | 87737f8946527ae96cd7fd41b6157c79d7c90964 (diff) | |
download | samba-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/schema')
-rw-r--r-- | source4/dsdb/schema/schema_syntax.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c index c26b407c1f..6159ab48b1 100644 --- a/source4/dsdb/schema/schema_syntax.c +++ b/source4/dsdb/schema/schema_syntax.c @@ -234,7 +234,9 @@ static WERROR dsdb_syntax_INT32_ldb_to_drsuapi(struct ldb_context *ldb, blobs[i] = data_blob_talloc(blobs, NULL, 4); W_ERROR_HAVE_NO_MEMORY(blobs[i].data); - v = strtol((const char *)in->values[i].data, NULL, 10); + /* We've to use "strtoll" here to have the intended overflows. + * Otherwise we may get "LONG_MAX" and the conversion is wrong. */ + v = strtoll((const char *)in->values[i].data, NULL, 0); SIVALS(blobs[i].data, 0, v); } |