[Python-checkins] r45947 - in python/trunk: Modules/_csv.c Modules/_elementtree.c Modules/_ssl.c Objects/longobject.c
Neal Norwitz
nnorwitz at gmail.com
Thu May 11 09:45:42 CEST 2006
On 5/11/06, M.-A. Lemburg <mal at egenix.com> wrote:
> Neal Norwitz wrote:
> > On 5/10/06, Thomas Wouters <thomas at python.org> wrote:
> >>
> >>
> >> On 5/10/06, neal.norwitz <python-checkins at python.org> wrote:
> >> > Modified: python/trunk/Modules/_ssl.c
> >> >
> >> ==============================================================================
> >>
> >> > --- python/trunk/Modules/_ssl.c (original)
> >> > +++ python/trunk/Modules/_ssl.c Wed May 10 08:57:58 2006
> >> > @@ -183,9 +183,9 @@
> >> > int sockstate;
> >> >
> >> > self = PyObject_New(PySSLObject, &PySSL_Type); /* Create new
> >> object */
> >> > - if (self == NULL){
> >> > - errstr = "newPySSLObject error";
> >> > - goto fail;
> >> > + if (self == NULL) {
> >> > + PyErr_SetString(PySSLErrorObject,
> >> "newPySSLObject error");
> >> > + return NULL;
> >> > }
> >> > memset(self->server, '\0', sizeof(char) * X509_NAME_MAXLEN);
> >> > memset(self->issuer, '\0', sizeof(char) * X509_NAME_MAXLEN);
> >>
> >>
> >> Is there a reason this clobbers the exception set by PyObject_New()?
> >> (Especially considering the useless error message the new exception
> >> contains
> >> :)
> >
> > Good point. I didn't even think about changing the code, I was just
> > fixing the Coverity warnings. I think MAL originally wrote this code.
> > It doesn't seem like we should set the error here. MAL?
>
> This is not my code - I only remember that it was contributed
> by some 3rd party.
Good enough for me. Fixing...
n
More information about the Python-checkins
mailing list