comparison src/event/ngx_event_openssl.c @ 3002:bf0c7e58e016

fix memory corruption in $ssl_client_cert
author Igor Sysoev <igor@sysoev.ru>
date Mon, 27 Jul 2009 11:51:12 +0000
parents 82451bc26405
children 823f72db46c0
comparison
equal deleted inserted replaced
3001:cf21d35248bc 3002:bf0c7e58e016
2009 return NGX_ERROR; 2009 return NGX_ERROR;
2010 } 2010 }
2011 2011
2012 p = s->data; 2012 p = s->data;
2013 2013
2014 for (i = 0; i < len; i++) { 2014 for (i = 0; i < cert.len - 1; i++) {
2015 *p++ = cert.data[i]; 2015 *p++ = cert.data[i];
2016 if (cert.data[i] == LF) { 2016 if (cert.data[i] == LF) {
2017 *p++ = '\t'; 2017 *p++ = '\t';
2018 } 2018 }
2019 } 2019 }