[New-bugs-announce] [issue38455] ‘memset’ offset [17, 88] from the object at ‘addrbuf’ is out of the bounds of referenced subobject

Pablo Galindo Salgado report at bugs.python.org
Sat Oct 12 15:11:40 EDT 2019


New submission from Pablo Galindo Salgado <pablogsal at gmail.com>:

Compiling 3.8 in release mode emits this warning:

In function ‘getsockaddrarg’,
    inlined from ‘sock_bind’ at /home/pablogsal/github/python/3.8/Modules/socketmodule.c:3066:10:
/home/pablogsal/github/python/3.8/Modules/socketmodule.c:2288:9: warning: ‘memset’ offset [17, 88] from the object at ‘addrbuf’ is out of the bounds of referenced subobject ‘sa’ with type ‘struct sockaddr’ at offset 0 [-Warray-bounds]
 2288 |         memset(sa, 0, sizeof(*sa));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~

----------
messages: 354547
nosy: lukasz.langa, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: ‘memset’ offset [17, 88] from the object at ‘addrbuf’ is out of the bounds of referenced subobject
versions: Python 3.8

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


More information about the New-bugs-announce mailing list