Avoid sending null byte in SASL PLAIN
Woops! BASE64_SIZE is the size of the string buffer. Somehow ergo is the only server software (that I know of) to reject the accidental null byte. Reported by smlavine.
This commit is contained in:
		
							parent
							
								
									e7cec13723
								
							
						
					
					
						commit
						605f889ab5
					
				
							
								
								
									
										2
									
								
								handle.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								handle.c
									
									
									
									
									
								
							| @ -219,7 +219,7 @@ static void handleAuthenticate(struct Message *msg) { | |||||||
| 	char b64[BASE64_SIZE(sizeof(buf))]; | 	char b64[BASE64_SIZE(sizeof(buf))]; | ||||||
| 	base64(b64, buf, len); | 	base64(b64, buf, len); | ||||||
| 	ircFormat("AUTHENTICATE "); | 	ircFormat("AUTHENTICATE "); | ||||||
| 	ircSend(b64, BASE64_SIZE(len)); | 	ircSend(b64, BASE64_SIZE(len) - 1); | ||||||
| 	ircFormat("\r\n"); | 	ircFormat("\r\n"); | ||||||
| 
 | 
 | ||||||
| 	explicit_bzero(b64, sizeof(b64)); | 	explicit_bzero(b64, sizeof(b64)); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user