Scott David Daniels wrote: > From yesterday's sprint
sprint? I was beginning to wonder why nobody cared about this; guess I missed the announcement ;-) > At the least a change like this will catch the unpacking: > in marshal.c (around line 500) in function r_object: > PyFPE_START_PROTECT("atof", return 0) > - dx = PyOS_ascii_atof(buf); > + dx = PyOS_ascii_strtod(buf, &endptr); > PyFPE_END_PROTECT(dx) the PROTECT contents should probably match the function you're using. > + if buf + n != &endptr) { > + PyErr_SetString(PyExc_ValueError, > + "not all marshalled float text read"); > + return NULL; this will fix the problem, sure. I still think it would be cleaner to reuse the float() semantics, since marshal.dumps uses repr(). to do that, you should use the code in floatobject.c (it wraps strtod in additional logic designed to take care of various plat- form quirks). but nevermind, you have a patch and I don't. if nobody objects, go ahead and check it in. </F> _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com