diff options
Diffstat (limited to 'src/w32notify.c')
-rw-r--r-- | src/w32notify.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/w32notify.c b/src/w32notify.c index 576cf844dab..71787c45db8 100644 --- a/src/w32notify.c +++ b/src/w32notify.c @@ -144,8 +144,9 @@ send_notifications (BYTE *info, DWORD info_size, void *desc, if (!notification_buffer_in_use) { if (info_size) - memcpy (file_notifications, info, info_size); - notifications_size = info_size; + memcpy (file_notifications, info, + min (info_size, sizeof (file_notifications))); + notifications_size = min (info_size, sizeof (file_notifications)); notifications_desc = desc; /* If PostMessage fails, the message queue is full. If that happens, the last thing they will worry about is file |