Description: Fix "format not a string literal and no format arguments"
Forwarded: no
Author: Sven Geuer <debmaint@g-e-u-e-r.de>
Last-Update: 2020-12-19
--- a/vncviewer/sockets.c
+++ b/vncviewer/sockets.c
@@ -102,7 +102,7 @@
 	    ProcessXtEvents();
 	    i = 0;
 	  } else {
-	    fprintf(stderr,programName);
+	    fprintf(stderr,"%s",programName);
 	    perror(": read");
 	    return False;
 	  }
@@ -131,7 +131,7 @@
 	    ProcessXtEvents();
 	    i = 0;
 	  } else {
-	    fprintf(stderr,programName);
+	    fprintf(stderr,"%s",programName);
 	    perror(": read");
 	    return False;
 	  }
@@ -171,13 +171,13 @@
 	  FD_SET(rfbsock,&fds);
 
 	  if (select(rfbsock+1, NULL, &fds, NULL, NULL) <= 0) {
-	    fprintf(stderr,programName);
+	    fprintf(stderr,"%s",programName);
 	    perror(": select");
 	    return False;
 	  }
 	  j = 0;
 	} else {
-	  fprintf(stderr,programName);
+	  fprintf(stderr,"%s",programName);
 	  perror(": write");
 	  return False;
 	}
@@ -209,13 +209,13 @@
 
   sock = socket(AF_INET, SOCK_STREAM, 0);
   if (sock < 0) {
-    fprintf(stderr,programName);
+    fprintf(stderr,"%s",programName);
     perror(": ConnectToTcpAddr: socket");
     return -1;
   }
 
   if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
-    fprintf(stderr,programName);
+    fprintf(stderr,"%s",programName);
     perror(": ConnectToTcpAddr: connect");
     close(sock);
     return -1;
@@ -223,7 +223,7 @@
 
   if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
 		 (char *)&one, sizeof(one)) < 0) {
-    fprintf(stderr,programName);
+    fprintf(stderr,"%s",programName);
     perror(": ConnectToTcpAddr: setsockopt");
     close(sock);
     return -1;
@@ -250,7 +250,7 @@
 
   sock = socket(AF_INET, SOCK_STREAM, 0);
   if (sock < 0) {
-    fprintf(stderr,programName);
+    fprintf(stderr,"%s",programName);
     perror(": FindFreeTcpPort: socket");
     return 0;
   }
@@ -285,28 +285,28 @@
 
   sock = socket(AF_INET, SOCK_STREAM, 0);
   if (sock < 0) {
-    fprintf(stderr,programName);
+    fprintf(stderr,"%s",programName);
     perror(": ListenAtTcpPort: socket");
     return -1;
   }
 
   if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
 		 (const char *)&one, sizeof(one)) < 0) {
-    fprintf(stderr,programName);
+    fprintf(stderr,"%s",programName);
     perror(": ListenAtTcpPort: setsockopt");
     close(sock);
     return -1;
   }
 
   if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
-    fprintf(stderr,programName);
+    fprintf(stderr,"%s",programName);
     perror(": ListenAtTcpPort: bind");
     close(sock);
     return -1;
   }
 
   if (listen(sock, 5) < 0) {
-    fprintf(stderr,programName);
+    fprintf(stderr,"%s",programName);
     perror(": ListenAtTcpPort: listen");
     close(sock);
     return -1;
@@ -330,14 +330,14 @@
 
   sock = accept(listenSock, (struct sockaddr *) &addr, &addrlen);
   if (sock < 0) {
-    fprintf(stderr,programName);
+    fprintf(stderr,"%s",programName);
     perror(": AcceptTcpConnection: accept");
     return -1;
   }
 
   if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
 		 (char *)&one, sizeof(one)) < 0) {
-    fprintf(stderr,programName);
+    fprintf(stderr,"%s",programName);
     perror(": AcceptTcpConnection: setsockopt");
     close(sock);
     return -1;
@@ -355,7 +355,7 @@
 SetNonBlocking(int sock)
 {
   if (fcntl(sock, F_SETFL, O_NONBLOCK) < 0) {
-    fprintf(stderr,programName);
+    fprintf(stderr,"%s",programName);
     perror(": AcceptTcpConnection: fcntl");
     return False;
   }
