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>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4