Ver Fonte

Merge pull request #1114 from linev/fix_warn

Fix compilation warning when USE_X_DOM_SOCKET is defined
bel2125 há 2 anos atrás
pai
commit
e25a33a4f8
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -3328,7 +3328,7 @@ sockaddr_to_string(char *buf, size_t len, const union usa *usa)
 		NI_NUMERICHOST);
 		*/
 		strncpy(buf, UNIX_DOMAIN_SOCKET_SERVER_NAME, len);
-		buf[len] = 0;
+		buf[len-1] = 0;
 	}
 #endif
 }