Skip to content

Commit

Permalink
rfbserver: don't leak stack memory to the remote
Browse files Browse the repository at this point in the history
Thanks go to Pavel Cheremushkin of Kaspersky for reporting.
  • Loading branch information
bk138 committed Aug 19, 2019
1 parent e0a9d96 commit d01e1bb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libvncserver/rfbserver.c
Expand Up @@ -3724,6 +3724,8 @@ rfbSendServerCutText(rfbScreenInfoPtr rfbScreen,char *str, int len)
rfbServerCutTextMsg sct;
rfbClientIteratorPtr iterator;

memset((char *)&sct, 0, sizeof(sct));

iterator = rfbGetClientIterator(rfbScreen);
while ((cl = rfbClientIteratorNext(iterator)) != NULL) {
sct.type = rfbServerCutText;
Expand Down

0 comments on commit d01e1bb

Please sign in to comment.