[issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data

Mark Dickinson report at bugs.python.org
Sat Nov 23 21:25:39 CET 2013


Mark Dickinson added the comment:

> PyOS_string_to_double() is a public function. The check is needed in case 
> 3rd party code uses it without extra checks.

In that case, I'd suggest something more like my modifications to dtoa.c.  By the time that you end up with a negative 'e', all sorts of other things have already gone wrong, possibly including undefined behaviour from signed integer overflow.  IF we need to modify dtoa.c, the check should be earlier IMO.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19638>
_______________________________________


More information about the Python-bugs-list mailing list