File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 2929#include <freerdp/freerdp.h>
3030#include <freerdp/gdi/gdi.h>
3131#include <guacamole/client.h>
32+ #include <guacamole/mem.h>
3233#include <winpr/crt.h>
3334
3435BOOL guac_rdp_pointer_new (rdpContext * context , rdpPointer * pointer ) {
@@ -41,7 +42,8 @@ BOOL guac_rdp_pointer_new(rdpContext* context, rdpPointer* pointer) {
4142 rdp_client -> display , pointer -> width , pointer -> height );
4243
4344 /* Allocate data for image */
44- unsigned char * data = _aligned_malloc (pointer -> width * pointer -> height * 4 , 16 );
45+ unsigned char * data = _aligned_malloc (guac_mem_ckd_mul_or_die (pointer -> width ,
46+ pointer -> height , 4 ), 16 );
4547
4648 cairo_surface_t * surface ;
4749
@@ -122,4 +124,3 @@ BOOL guac_rdp_pointer_set_default(rdpContext* context) {
122124
123125 return TRUE;
124126}
125-
You can’t perform that action at this time.
0 commit comments