Re: cvs: php-src /ext/openssl openssl.c

From: Date: Mon, 30 Mar 2009 06:04:01 +0000
Subject: Re: cvs: php-src /ext/openssl openssl.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-56799@lists.php.net to get a copy of this message
hi Scott, How did you reproduce the crash (ssl version, and with which input or config)? Please add a test case. Also please keep an eye on the "assign" field of a bug report, it is here for good reasons. Cheers, On Mon, Mar 30, 2009 at 1:32 AM, Scott MacVicar <scottmac@php.net> wrote: > scottmac                Sun Mar 29 23:32:17 2009 UTC > >  Modified files: >    /php-src/ext/openssl        openssl.c >  Log: >  Fix bug #47828 - Converting to UTF-8 can sometimes fail, check error codes and avoid > segfault. > > > > (Ð@†ÜÝ.H- Æ)n+ > http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.179&r2=1.180&diff_format=u > Index: php-src/ext/openssl/openssl.c > diff -u php-src/ext/openssl/openssl.c:1.179 php-src/ext/openssl/openssl.c:1.180 > --- php-src/ext/openssl/openssl.c:1.179 Tue Mar 10 23:39:27 2009 > +++ php-src/ext/openssl/openssl.c       Sun Mar 29 23:32:17 2009 > @@ -20,7 +20,7 @@ >    +----------------------------------------------------------------------+ >  */ > > -/* $Id: openssl.c,v 1.179 2009/03/10 23:39:27 helly Exp $ */ > +/* $Id: openssl.c,v 1.180 2009/03/29 23:32:17 scottmac Exp $ */ > >  #ifdef HAVE_CONFIG_H >  #include "config.h" > @@ -557,10 +557,12 @@ >                                str = X509_NAME_ENTRY_get_data(ne); >                                if (ASN1_STRING_type(str) != V_ASN1_UTF8STRING) > { >                                        to_add_len = > ASN1_STRING_to_UTF8(&to_add, str); > -                                       > add_next_index_utf8_stringl(subentries, (char *)to_add, to_add_len, 1); >                                } else { >                                        to_add = ASN1_STRING_data(str); >                                        to_add_len = > ASN1_STRING_length(str); > +                               } > + > +                               if (to_add_len != -1) { >                                       >  add_next_index_utf8_stringl(subentries, (char *)to_add, to_add_len, 1); >                                } >                        } > @@ -573,7 +575,7 @@ >                } else { >                        zval_dtor(subentries); >                        FREE_ZVAL(subentries); > -                       if (obj_cnt && str) { > +                       if (obj_cnt && str && to_add_len != -1) { >                                add_ascii_assoc_utf8_stringl(subitem, sname, > (char *)to_add, to_add_len, 1); >                        } >                } > > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Pierre http://blog.thepimp.net | http://www.libgd.org

« previous php.cvs (#56799) next »