[New-bugs-announce] [issue28119] Explicit null dereferenced in formatter_unicode.c

Christian Heimes report at bugs.python.org
Tue Sep 13 03:32:03 EDT 2016


New submission from Christian Heimes:

Coverity is warning about four cases of potential NULL forwarding in which subsequent code does not expect a NULL value.

30. no_write_call: Although get_locale_info does overwrite locale.decimal_point on some paths, it also contains at least one feasible path which does not overwrite it.

1140    /* Calculate how much memory we'll need. */
    CID 1372743: Explicit null dereferenced (FORWARD_NULL) [select issue]
    CID 1372744: Explicit null dereferenced (FORWARD_NULL) [select issue]
    CID 1372745 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)21. var_deref_model: Passing &locale to calc_number_widths, which dereferences null locale.grouping. [show details]
1141    n_total = calc_number_widths(&spec, 0, sign_char, unicode_tmp, index,
1142                                 index + n_digits, n_remainder, has_decimal,
1143                                 &locale, format, &maxchar);


1322    /* Calculate how much memory we'll need. */
    CID 1372742 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)32. var_deref_model: Passing &locale to calc_number_widths, which dereferences null locale.decimal_point. [show details]
1323    n_re_total = calc_number_widths(&re_spec, 0, re_sign_char, re_unicode_tmp,
1324                                    i_re, i_re + n_re_digits, n_re_remainder,
1325                                    re_has_decimal, &locale, &tmp_format,
1326                                    &maxchar);

----------
components: Interpreter Core
messages: 276198
nosy: christian.heimes
priority: normal
severity: normal
stage: test needed
status: open
title: Explicit null dereferenced in formatter_unicode.c
type: behavior
versions: Python 3.6, Python 3.7

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


More information about the New-bugs-announce mailing list