aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nx-X11/programs/Xserver/record/set.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/record/set.c b/nx-X11/programs/Xserver/record/set.c
index c3085c54d..3086f9670 100644
--- a/nx-X11/programs/Xserver/record/set.c
+++ b/nx-X11/programs/Xserver/record/set.c
@@ -357,7 +357,8 @@ IntervalListCreateSet(RecordSetInterval *pIntervals, int nIntervals,
if (!prls) goto bailout;
prls->baseSet.ops = &IntervalListSetOperations;
}
- memcpy(&prls[1], stackIntervals, nIntervals * sizeof(RecordSetInterval));
+ if (nIntervals > 0)
+ memcpy(&prls[1], stackIntervals, nIntervals * sizeof(RecordSetInterval));
prls->nIntervals = nIntervals;
bailout:
if (stackIntervals) free(stackIntervals);