From 179ea94db2976a0f6788cfa91d404ca3e3d9f022 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Nov 25 2020 06:14:53 +0000 Subject: Apply patch libvncserver-0.9.11-CVE-2018-21247.patch patch_name: libvncserver-0.9.11-CVE-2018-21247.patch present_in_specfile: true location_in_specfile: 16 --- diff --git a/examples/repeater.c b/examples/repeater.c index cf0350f..7047578 100644 --- a/examples/repeater.c +++ b/examples/repeater.c @@ -23,6 +23,7 @@ int main(int argc,char** argv) "Usage: %s []\n", argv[0]); exit(1); } + memset(id, 0, sizeof(id)); snprintf(id, sizeof(id) - 1, "ID:%s", argv[1]); repeaterHost = argv[2]; repeaterPort = argc < 4 ? 5500 : atoi(argv[3]); diff --git a/libvncclient/rfbproto.c b/libvncclient/rfbproto.c index c633a88..94751a2 100644 --- a/libvncclient/rfbproto.c +++ b/libvncclient/rfbproto.c @@ -522,6 +522,7 @@ rfbBool ConnectToRFBRepeater(rfbClient* client,const char *repeaterHost, int rep rfbClientLog("Connected to VNC repeater, using protocol version %d.%d\n", major, minor); + memset(tmphost, 0, sizeof(tmphost)); snprintf(tmphost, sizeof(tmphost), "%s:%d", destHost, destPort); if (!WriteToRFBServer(client, tmphost, sizeof(tmphost))) return FALSE;