Avoid out-of-bounds write in SSL_get_shared_ciphers
PR: 3317
This commit is contained in:
		
				
					committed by
					
						
						Matt Caswell
					
				
			
			
				
	
			
			
			
						parent
						
							c3c6fc7855
						
					
				
				
					commit
					15c1ac03c8
				
			@@ -1347,6 +1347,9 @@ char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len)
 | 
				
			|||||||
		(len < 2))
 | 
							(len < 2))
 | 
				
			||||||
		return(NULL);
 | 
							return(NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (sk_SSL_CIPHER_num(sk) == 0)
 | 
				
			||||||
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	p=buf;
 | 
						p=buf;
 | 
				
			||||||
	sk=s->session->ciphers;
 | 
						sk=s->session->ciphers;
 | 
				
			||||||
	for (i=0; i<sk_SSL_CIPHER_num(sk); i++)
 | 
						for (i=0; i<sk_SSL_CIPHER_num(sk); i++)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user