Commit: 8c7df5fa72ee486c1be02a423491b1fb06ead416
Author: Campbell Barton
Date:   Sun Jan 15 23:45:56 2023 +1100
Branches: master
https://developer.blender.org/rB8c7df5fa72ee486c1be02a423491b1fb06ead416

Fix invalid arguments to memcpy in IMB_rectfill_area_replace

Passing the pointer to the array doesn't make sense in this case.

===================================================================

M       source/blender/imbuf/intern/rectop.c

===================================================================

diff --git a/source/blender/imbuf/intern/rectop.c 
b/source/blender/imbuf/intern/rectop.c
index 81fdac40ee6..65bbb4a7be2 100644
--- a/source/blender/imbuf/intern/rectop.c
+++ b/source/blender/imbuf/intern/rectop.c
@@ -1112,12 +1112,12 @@ void IMB_rectfill_area_replace(
 
       if (ibuf->rect) {
         uchar *rrect = (uchar *)ibuf->rect + offset;
-        memcpy(rrect, &col_char, sizeof(uchar) * 4);
+        memcpy(rrect, col_char, sizeof(uchar[4]));
       }
 
       if (ibuf->rect_float) {
         float *rrectf = ibuf->rect_float + offset;
-        memcpy(rrectf, &col, sizeof(float) * 4);
+        memcpy(rrectf, col, sizeof(float[4]));
       }
     }
   }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to