virtfs-proxy-helper: fix call to accept
The current code calls accept() without initializing the size parameter which means the accept call might write too much to the stack. URL: https://bugs.gentoo.org/486714 Signed-off-by: Tim Comer <comer0@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
		
							parent
							
								
									9057698d93
								
							
						
					
					
						commit
						b0f9300ca3
					
				| 
						 | 
					@ -760,6 +760,7 @@ static int proxy_socket(const char *path, uid_t uid, gid_t gid)
 | 
				
			||||||
        return -1;
 | 
					        return -1;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    size = sizeof(qemu);
 | 
				
			||||||
    client = accept(sock, (struct sockaddr *)&qemu, &size);
 | 
					    client = accept(sock, (struct sockaddr *)&qemu, &size);
 | 
				
			||||||
    if (client < 0) {
 | 
					    if (client < 0) {
 | 
				
			||||||
        do_perror("accept");
 | 
					        do_perror("accept");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue