diff options
Diffstat (limited to 'Xi/exevents.c')
-rw-r--r-- | Xi/exevents.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 0857bcee6..1c586d051 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -471,9 +471,9 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) oldTrace = to->focus->trace; memcpy(to->focus, from->focus, sizeof(FocusClassRec)); - to->focus->trace = realloc(oldTrace, - to->focus->traceSize * - sizeof(WindowPtr)); + to->focus->trace = reallocarray(oldTrace, + to->focus->traceSize, + sizeof(WindowPtr)); if (!to->focus->trace && to->focus->traceSize) FatalError("[Xi] no memory for trace.\n"); memcpy(to->focus->trace, from->focus->trace, |