s4: int32 handling: previous fix was not fully correct
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Mon, 17 Aug 2009 18:42:39 +0000 (20:42 +0200)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Mon, 17 Aug 2009 18:42:39 +0000 (20:42 +0200)
source4/dsdb/schema/schema_syntax.c

index 6159ab48b1a1cbb6e27c8d64ebdbd9b899723327..2f14e3c472bad8023c153b30c40bc1463e694f8c 100644 (file)
@@ -236,7 +236,7 @@ static WERROR dsdb_syntax_INT32_ldb_to_drsuapi(struct ldb_context *ldb,
 
                /* 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);
+               v = (int32_t) strtoll((char *)in->values[i].data, NULL, 0);
 
                SIVALS(blobs[i].data, 0, v);
        }