[New-bugs-announce] [issue34474] Python/bltinmodule.c: Missing NULL check in builtin_sum_impl()

Alexey Izbyshev report at bugs.python.org
Thu Aug 23 10:04:14 EDT 2018


New submission from Alexey Izbyshev <izbyshev at ispras.ru>:

The return value of PyFloat_FromDouble() at https://github.com/python/cpython/blob/48ce4897f8f8d91d948ecd1241ffab002df2be9e/Python/bltinmodule.c#L2403 is not checked for NULL and then dereferenced.

Reported by Svace static analyzer.

A similar issue in an 'if' statement above was fixed in #18560. Note that 2.7 is affected by both issues, so I can fix both if needed.

----------
components: Interpreter Core
messages: 323946
nosy: berker.peksag, izbyshev, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Python/bltinmodule.c: Missing NULL check in builtin_sum_impl()
type: behavior
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34474>
_______________________________________


More information about the New-bugs-announce mailing list