﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
411	misallocation with ngx_mail_smtp_module at STARTTLS	markus-linnala.myopenid.com		" I modified ​http://mdounin.ru/hg/nginx-tests to use valgrind.

Test was mail_imap.t

==10647== Invalid write of size 1
==10647==    at 0x4B1493: ngx_mail_smtp_merge_srv_conf (ngx_mail_smtp_module.c:280)
==10647==    by 0x4AB363: ngx_mail_block (ngx_mail.c:209)
==10647==    by 0x4303BE: ngx_conf_parse (ngx_conf_file.c:391)
==10647==    by 0x42DF03: ngx_init_cycle (ngx_cycle.c:265)
==10647==    by 0x4206A9: main (nginx.c:333)
==10647==  Address 0x550fb84 is 0 bytes after a block of size 68 alloc'd
==10647==    at 0x4A074CD: malloc (vg_replace_malloc.c:236)
==10647==    by 0x43B251: ngx_alloc (ngx_alloc.c:22)
==10647==    by 0x421B0D: ngx_malloc (ngx_palloc.c:119)
==10647==    by 0x421B65: ngx_pnalloc (ngx_palloc.c:147)
==10647==    by 0x4B1447: ngx_mail_smtp_merge_srv_conf (ngx_mail_smtp_module.c:269)
==10647==    by 0x4AB363: ngx_mail_block (ngx_mail.c:209)
==10647==    by 0x4303BE: ngx_conf_parse (ngx_conf_file.c:391)
==10647==    by 0x42DF03: ngx_init_cycle (ngx_cycle.c:265)
==10647==    by 0x4206A9: main (nginx.c:333)
==10647==

Clearly memory for second CR + LF is not allocated."	defect	closed	minor		nginx-core	1.3.x	fixed				nginx version: nginx/1.5.5 
