A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-May/119239.html below:

[Python-Dev] [Python-checkins] cpython: avoid unitialized memory

[Python-Dev] [Python-checkins] cpython: avoid unitialized memoryEric V. Smith eric at trueblade.com
Fri May 4 10:21:35 CEST 2012
On 5/4/2012 1:14 AM, benjamin.peterson wrote:
> http://hg.python.org/cpython/rev/b0deafca6c02
> changeset:   76743:b0deafca6c02
> user:        Benjamin Peterson <benjamin at python.org>
> date:        Fri May 04 01:14:03 2012 -0400
> summary:
>   avoid unitialized memory
> 
> files:
>   Modules/posixmodule.c |  2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
> 
> 
> diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
> --- a/Modules/posixmodule.c
> +++ b/Modules/posixmodule.c
> @@ -3576,7 +3576,7 @@
>  split_py_long_to_s_and_ns(PyObject *py_long, time_t *s, long *ns)
>  {
>      int result = 0;
> -    PyObject *divmod;
> +    PyObject *divmod = NULL;
>      divmod = PyNumber_Divmod(py_long, billion);

How is that uninitialized if it's being set on the next line?

More information about the Python-Dev mailing list

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