Skip to content

Commit

Permalink
GUACAMOLE-1971: Merge fix for potential integer overflow in memory al…
Browse files Browse the repository at this point in the history
…location.
  • Loading branch information
jmuehlner authored Jul 19, 2024
2 parents 8bc7319 + 0994ee6 commit 2aabe28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/protocols/rdp/pointer.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <freerdp/freerdp.h>
#include <freerdp/gdi/gdi.h>
#include <guacamole/client.h>
#include <guacamole/mem.h>
#include <winpr/crt.h>

BOOL guac_rdp_pointer_new(rdpContext* context, rdpPointer* pointer) {
Expand All @@ -42,7 +43,8 @@ BOOL guac_rdp_pointer_new(rdpContext* context, rdpPointer* pointer) {
rdp_client->display, pointer->width, pointer->height);

/* Allocate data for image */
unsigned char* data = GUAC_ALIGNED_MALLOC(pointer->width * pointer->height * 4, 16);
unsigned char* data = GUAC_ALIGNED_MALLOC(guac_mem_ckd_mul_or_die(pointer->width,
pointer->height, 4), 16);

cairo_surface_t* surface;

Expand Down

0 comments on commit 2aabe28

Please sign in to comment.