From 5db8919c98d8108a807d1ff296f352c83e79638e Mon Sep 17 00:00:00 2001 From: Anthony Tong Date: Thu, 1 Sep 2011 15:13:19 -0400 Subject: [PATCH] fix memory corruption issue --- libfreerdp-core/orders.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libfreerdp-core/orders.c b/libfreerdp-core/orders.c index 8d73089c9..573782490 100644 --- a/libfreerdp-core/orders.c +++ b/libfreerdp-core/orders.c @@ -753,9 +753,9 @@ void update_read_polyline_order(STREAM* s, ORDER_INFO* orderInfo, POLYLINE_ORDER stream_read_uint8(s, polyline->cbData); if (polyline->points == NULL) - polyline->points = (DELTA_POINT*) xmalloc(polyline->cbData); + polyline->points = (DELTA_POINT*) xmalloc(sizeof(DELTA_POINT) * polyline->cbData); else - polyline->points = (DELTA_POINT*) xrealloc(polyline->points, polyline->cbData); + polyline->points = (DELTA_POINT*) xrealloc(polyline->points, sizeof(DELTA_POINT) * polyline->cbData); update_read_delta_points(s, polyline->points, polyline->numPoints, polyline->xStart, polyline->yStart); }