zero-terminate imap literals
now that we properly support literals for strings, we must expect that
the consumer code will use them as strings.
amends fc77feacc.
discovered by Armands Liepins <armandsl@gmail.com>
REFMAIL: CAF_KswXoxdm7KXnWW4b_1odf=XsE4qRqRN4AsecwcPF1d+dSTA@mail.gmail.com
			
			
This commit is contained in:
		
							parent
							
								
									4ab12ae76e
								
							
						
					
					
						commit
						8513358e0a
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -687,7 +687,8 @@ parse_imap_list( imap_store_t *ctx, char **sp, parse_list_state_t *sts )
 | 
			
		|||
			if (*s != '}' || *++s)
 | 
			
		||||
				goto bail;
 | 
			
		||||
 | 
			
		||||
			s = cur->val = nfmalloc( cur->len );
 | 
			
		||||
			s = cur->val = nfmalloc( cur->len + 1 );
 | 
			
		||||
			s[cur->len] = 0;
 | 
			
		||||
 | 
			
		||||
		  getbytes:
 | 
			
		||||
			bytes -= socket_read( &ctx->conn, s, bytes );
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue