We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3304e13 commit 3fd0397Copy full SHA for 3fd0397
1 file changed
libvncclient/sockets.c
@@ -461,6 +461,10 @@ ConnectClientToUnixSock(const char *sockFile)
461
int sock;
462
struct sockaddr_un addr;
463
addr.sun_family = AF_UNIX;
464
+ if(strlen(sockFile) + 1 > sizeof(addr.sun_path)) {
465
+ rfbClientErr("ConnectToUnixSock: socket file name too long\n");
466
+ return -1;
467
+ }
468
strcpy(addr.sun_path, sockFile);
469
470
sock = socket(AF_UNIX, SOCK_STREAM, 0);
0 commit comments