s3:utils: Avoid integer overflow (CID 1548343)
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 30 Oct 2023 22:35:25 +0000 (11:35 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 2 Nov 2023 03:08:37 +0000 (03:08 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/rpc_client/wsp_cli.c

index 34eb1bc2696a52591ba96e9976130f1f415e1574..0c6b53d0e17dfc5a4520d2d45ae9b7326a733ef1 100644 (file)
@@ -1170,7 +1170,7 @@ static enum ndr_err_code process_columns(TALLOC_CTX *ctx,
        enum ndr_err_code err  = NDR_ERR_SUCCESS;
        struct ndr_pull *ndr_pull = NULL;
        ndr_flags_type ndr_flags = NDR_SCALARS | NDR_BUFFERS;
-       uint64_t nrow_offset = nrow * bindingin->brow;
+       uint64_t nrow_offset = (uint64_t)nrow * bindingin->brow;
 
        if (nrow_offset >= rows_buf->length) {
                DBG_ERR("offset %"PRIu64" outside buffer range (buf len - %zu)\n",