Revert "The previous malloc fix was too large."
authorAnthony Tong <atong@trustedcs.com>
Fri, 2 Sep 2011 15:08:50 +0000 (11:08 -0400)
committerAnthony Tong <atong@trustedcs.com>
Fri, 2 Sep 2011 15:08:50 +0000 (11:08 -0400)
This reverts commit 82e62778bc28dacc4b860c94e7bdceac8512b7fe.

libfreerdp-core/orders.c

index ef124f5..5737824 100644 (file)
@@ -751,11 +751,11 @@ void update_read_polyline_order(STREAM* s, ORDER_INFO* orderInfo, POLYLINE_ORDER
        if (orderInfo->fieldFlags & ORDER_FIELD_07)
        {
                stream_read_uint8(s, polyline->cbData);
-fprintf(stderr, "TONG %d %d %d\n", sizeof(DELTA_POINT*), polyline->cbData, polyline->numPoints);
+
                if (polyline->points == NULL)
-                       polyline->points = (DELTA_POINT*) xmalloc(sizeof(DELTA_POINT) * polyline->numPoints);
+                       polyline->points = (DELTA_POINT*) xmalloc(sizeof(DELTA_POINT) * polyline->cbData);
                else
-                       polyline->points = (DELTA_POINT*) xrealloc(polyline->points, sizeof(DELTA_POINT) * polyline->numPoints);
+                       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);
        }