Ver Fonte

- from_len properly initialized to the size of from parameter,
reported by Martin Rusnak

Jan Janak há 20 anos atrás
pai
commit
6e7962a674
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      utils/serunix/serunix.c

+ 1 - 0
utils/serunix/serunix.c

@@ -95,6 +95,7 @@ int main(int argc, char** argv)
 		        goto err;
 		}
 
+		from_len = sizeof(from);
 		len = recvfrom(sock, buffer, BUF_SIZE, 0, (struct sockaddr*)&from, &from_len);
 		if (len == -1) {
 			fprintf(stderr, "Error in recvfrom: %s\n", strerror(errno));