{"$schema": "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json",
 "version": "2.1.0",
 "runs": [{"tool": {"driver": {"name": "GNU C23",
                               "fullName": "GNU C23 (GCC) version 16.1.1 20260515 (Red Hat 16.1.1-2) (x86_64-redhat-linux)",
                               "version": "16.1.1 20260515 (Red Hat 16.1.1-2)",
                               "informationUri": "https://gcc.gnu.org/gcc-16/",
                               "rules": [{"id": "-Wanalyzer-out-of-bounds",
                                          "helpUri": "https://gcc.gnu.org/onlinedocs/gcc-16.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-out-of-bounds"}]}},
           "taxonomies": [{"name": "CWE",
                           "version": "4.7",
                           "organization": "MITRE",
                           "shortDescription": {"text": "The MITRE Common Weakness Enumeration"},
                           "taxa": [{"id": "124",
                                     "helpUri": "https://cwe.mitre.org/data/definitions/124.html"}]}],
           "invocations": [{"arguments": ["/usr/libexec/gcc/x86_64-redhat-linux/16/cc1",
                                          "-quiet",
                                          "-I",
                                          "/usr/include/python3.14",
                                          "-D",
                                          "PSUTIL_POSIX=1",
                                          "-D",
                                          "PSUTIL_SIZEOF_PID_T=4",
                                          "-D",
                                          "PSUTIL_VERSION=722",
                                          "-D",
                                          "Py_LIMITED_API=0x03060000",
                                          "-D",
                                          "PSUTIL_LINUX=1",
                                          "psutil/arch/posix/net.c",
                                          "-quiet",
                                          "-dumpbase",
                                          "net.c",
                                          "-dumpbase-ext",
                                          ".c",
                                          "-m64",
                                          "-mtune=generic",
                                          "-march=x86-64",
                                          "-mtls-dialect=gnu2",
                                          "-O2",
                                          "-Wno-unknown-pragmas",
                                          "-flto=auto",
                                          "-ffat-lto-objects",
                                          "-fexceptions",
                                          "-fstack-protector-strong",
                                          "-fasynchronous-unwind-tables",
                                          "-fstack-clash-protection",
                                          "-fcf-protection=full",
                                          "-fno-omit-frame-pointer",
                                          "-fPIC",
                                          "-fanalyzer",
                                          "-fdiagnostics-path-format=separate-events",
                                          "-fno-diagnostics-show-caret",
                                          "-fno-lto",
                                          "-fanalyzer-assume-nothrow",
                                          "-fdiagnostics-text-art-charset=none",
                                          "-fdiagnostics-set-output=sarif:file=/builddir/gcc-results/271-aYTe.sarif",
                                          "-o",
                                          "/builddir/build/BUILD/python-psutil-7.2.2-build/.pyproject-builddir/ccGW4pvC.s"],
                            "workingDirectory": {"uri": "/builddir/build/BUILD/python-psutil-7.2.2-build/psutil-release-7.2.2"},
                            "startTimeUtc": "2026-06-01T16:15:06Z",
                            "executionSuccessful": true,
                            "toolExecutionNotifications": [],
                            "endTimeUtc": "2026-06-01T16:15:06Z"}],
           "originalUriBaseIds": {"PWD": {"uri": "file:///builddir/build/BUILD/python-psutil-7.2.2-build/psutil-release-7.2.2/"}},
           "artifacts": [{"location": {"uri": "psutil/arch/posix/net.c",
                                       "uriBaseId": "PWD"},
                          "sourceLanguage": "c",
                          "contents": {"text": "/*\n * Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n#include <Python.h>\n#include <errno.h>\n#include <stdlib.h>\n#include <sys/types.h>\n#include <sys/socket.h>\n#include <sys/ioctl.h>\n#include <net/if.h>\n#include <unistd.h>\n\n#ifdef PSUTIL_AIX\n#include \"arch/aix/ifaddrs.h\"\n#else\n#include <ifaddrs.h>\n#endif\n\n#if defined(PSUTIL_LINUX)\n#include <netdb.h>\n#include <linux/types.h>\n#include <linux/if_packet.h>\n#endif\n\n#if defined(PSUTIL_BSD) || defined(PSUTIL_OSX)\n#include <netdb.h>\n#include <netinet/in.h>\n#include <net/if_dl.h>\n#include <sys/sockio.h>\n#include <net/if_media.h>\n#include <net/if.h>\n#endif\n\n#if defined(PSUTIL_SUNOS)\n#include <netdb.h>\n#include <sys/sockio.h>\n#endif\n\n#if defined(PSUTIL_AIX)\n#include <netdb.h>\n#endif\n\n#include \"../../arch/all/init.h\"\n\n\n/*\n * Translate a sockaddr struct into a Python string.\n * Return None if address family is not AF_INET* or AF_PACKET.\n */\nPyObject *\npsutil_convert_ipaddr(struct sockaddr *addr, int family) {\n    char buf[NI_MAXHOST];\n    int err;\n    int addrlen;\n    size_t n;\n    size_t len;\n    const char *data;\n    char *ptr;\n\n    if (addr == NULL) {\n        Py_INCREF(Py_None);\n        return Py_None;\n    }\n    else if (family == AF_INET || family == AF_INET6) {\n        if (family == AF_INET)\n            addrlen = sizeof(struct sockaddr_in);\n        else\n            addrlen = sizeof(struct sockaddr_in6);\n        err = getnameinfo(\n            addr, addrlen, buf, sizeof(buf), NULL, 0, NI_NUMERICHOST\n        );\n        if (err != 0) {\n            // XXX we get here on FreeBSD when processing 'lo' / AF_INET6\n            // broadcast. Not sure what to do other than returning None.\n            // ifconfig does not show anything BTW.\n            // psutil_runtime_error(gai_strerror(err));\n            // return NULL;\n            Py_INCREF(Py_None);\n            return Py_None;\n        }\n        else {\n            return Py_BuildValue(\"s\", buf);\n        }\n    }\n#ifdef PSUTIL_LINUX\n    else if (family == AF_PACKET) {\n        struct sockaddr_ll *lladdr = (struct sockaddr_ll *)addr;\n        len = lladdr->sll_halen;\n        data = (const char *)lladdr->sll_addr;\n    }\n#elif defined(PSUTIL_BSD) || defined(PSUTIL_OSX)\n    else if (addr->sa_family == AF_LINK) {\n        // Note: prior to Python 3.4 socket module does not expose\n        // AF_LINK so we'll do.\n        struct sockaddr_dl *dladdr = (struct sockaddr_dl *)addr;\n        len = dladdr->sdl_alen;\n        data = LLADDR(dladdr);\n    }\n#endif\n    else {\n        // unknown family\n        Py_INCREF(Py_None);\n        return Py_None;\n    }\n\n    // AF_PACKET or AF_LINK\n    if (len > 0) {\n        ptr = buf;\n        for (n = 0; n < len; ++n) {\n            str_format(ptr, sizeof(ptr), \"%02x:\", data[n] & 0xff);\n            ptr += 3;\n        }\n        *--ptr = '\\0';\n        return Py_BuildValue(\"s\", buf);\n    }\n    else {\n        Py_INCREF(Py_None);\n        return Py_None;\n    }\n}\n\n\n/*\n * Return NICs information a-la ifconfig as a list of tuples.\n * TODO: on Solaris we won't get any MAC address.\n */\nPyObject *\npsutil_net_if_addrs(PyObject *self, PyObject *args) {\n    struct ifaddrs *ifaddr, *ifa;\n    int family;\n\n    PyObject *py_retlist = PyList_New(0);\n    PyObject *py_tuple = NULL;\n    PyObject *py_address = NULL;\n    PyObject *py_netmask = NULL;\n    PyObject *py_broadcast = NULL;\n    PyObject *py_ptp = NULL;\n\n    if (py_retlist == NULL)\n        return NULL;\n    if (getifaddrs(&ifaddr) == -1) {\n        psutil_oserror();\n        goto error;\n    }\n\n    for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {\n        if (!ifa->ifa_addr)\n            continue;\n        family = ifa->ifa_addr->sa_family;\n        py_address = psutil_convert_ipaddr(ifa->ifa_addr, family);\n        // If the primary address can't be determined just skip it.\n        // I've never seen this happen on Linux but I did on FreeBSD.\n        if (py_address == Py_None)\n            continue;\n        if (py_address == NULL)\n            goto error;\n        py_netmask = psutil_convert_ipaddr(ifa->ifa_netmask, family);\n        if (py_netmask == NULL)\n            goto error;\n\n        if (ifa->ifa_flags & IFF_BROADCAST) {\n            py_broadcast = psutil_convert_ipaddr(ifa->ifa_broadaddr, family);\n            Py_INCREF(Py_None);\n            py_ptp = Py_None;\n        }\n        else if (ifa->ifa_flags & IFF_POINTOPOINT) {\n            py_ptp = psutil_convert_ipaddr(ifa->ifa_dstaddr, family);\n            Py_INCREF(Py_None);\n            py_broadcast = Py_None;\n        }\n        else {\n            Py_INCREF(Py_None);\n            Py_INCREF(Py_None);\n            py_broadcast = Py_None;\n            py_ptp = Py_None;\n        }\n\n        if ((py_broadcast == NULL) || (py_ptp == NULL))\n            goto error;\n        py_tuple = Py_BuildValue(\n            \"(siOOOO)\",\n            ifa->ifa_name,\n            family,\n            py_address,\n            py_netmask,\n            py_broadcast,\n            py_ptp\n        );\n\n        if (!py_tuple)\n            goto error;\n        if (PyList_Append(py_retlist, py_tuple))\n            goto error;\n        Py_CLEAR(py_tuple);\n        Py_CLEAR(py_address);\n        Py_CLEAR(py_netmask);\n        Py_CLEAR(py_broadcast);\n        Py_CLEAR(py_ptp);\n    }\n\n    freeifaddrs(ifaddr);\n    return py_retlist;\n\nerror:\n    if (ifaddr != NULL)\n        freeifaddrs(ifaddr);\n    Py_DECREF(py_retlist);\n    Py_XDECREF(py_tuple);\n    Py_XDECREF(py_address);\n    Py_XDECREF(py_netmask);\n    Py_XDECREF(py_broadcast);\n    Py_XDECREF(py_ptp);\n    return NULL;\n}\n\n\n/*\n * Return NIC MTU. References:\n * http://www.i-scream.org/libstatgrab/\n */\nPyObject *\npsutil_net_if_mtu(PyObject *self, PyObject *args) {\n    char *nic_name;\n    int sock = -1;\n    int ret;\n    struct ifreq ifr;\n\n    if (!PyArg_ParseTuple(args, \"s\", &nic_name))\n        return NULL;\n\n    sock = socket(AF_INET, SOCK_DGRAM, 0);\n    if (sock == -1)\n        goto error;\n\n    str_copy(ifr.ifr_name, sizeof(ifr.ifr_name), nic_name);\n    ret = ioctl(sock, SIOCGIFMTU, &ifr);\n    if (ret == -1)\n        goto error;\n    close(sock);\n\n    return Py_BuildValue(\"i\", ifr.ifr_mtu);\n\nerror:\n    if (sock != -1)\n        close(sock);\n    return psutil_oserror();\n}\n\nstatic int\nappend_flag(PyObject *py_retlist, const char *flag_name) {\n    PyObject *py_str = NULL;\n\n    py_str = PyUnicode_FromString(flag_name);\n    if (!py_str)\n        return 0;\n    if (PyList_Append(py_retlist, py_str)) {\n        Py_DECREF(py_str);\n        return 0;\n    }\n    Py_CLEAR(py_str);\n\n    return 1;\n}\n\n/*\n * Get all of the NIC flags and return them.\n */\nPyObject *\npsutil_net_if_flags(PyObject *self, PyObject *args) {\n    char *nic_name;\n    int sock = -1;\n    int ret;\n    struct ifreq ifr;\n    PyObject *py_retlist = PyList_New(0);\n    short int flags;\n\n    if (py_retlist == NULL)\n        return NULL;\n\n    if (!PyArg_ParseTuple(args, \"s\", &nic_name))\n        goto error;\n\n    sock = socket(AF_INET, SOCK_DGRAM, 0);\n    if (sock == -1) {\n        psutil_oserror_wsyscall(\"socket(SOCK_DGRAM)\");\n        goto error;\n    }\n\n    str_copy(ifr.ifr_name, sizeof(ifr.ifr_name), nic_name);\n    ret = ioctl(sock, SIOCGIFFLAGS, &ifr);\n    if (ret == -1) {\n        psutil_oserror_wsyscall(\"ioctl(SIOCGIFFLAGS)\");\n        goto error;\n    }\n\n    close(sock);\n    sock = -1;\n\n    flags = ifr.ifr_flags & 0xFFFF;\n\n    // Linux/glibc IFF flags:\n    // https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/gnu/net/if.h;h=251418f82331c0426e58707fe4473d454893b132;hb=HEAD\n    // macOS IFF flags:\n    // https://opensource.apple.com/source/xnu/xnu-792/bsd/net/if.h.auto.html\n    // AIX IFF flags:\n    // https://www.ibm.com/support/pages/how-hexadecimal-flags-displayed-ifconfig-are-calculated\n    // FreeBSD IFF flags:\n    // https://www.freebsd.org/cgi/man.cgi?query=if_allmulti&apropos=0&sektion=0&manpath=FreeBSD+10-current&format=html\n\n#ifdef IFF_UP\n    // Available in (at least) Linux, macOS, AIX, BSD\n    if (flags & IFF_UP)\n        if (!append_flag(py_retlist, \"up\"))\n            goto error;\n#endif\n#ifdef IFF_BROADCAST\n    // Available in (at least) Linux, macOS, AIX, BSD\n    if (flags & IFF_BROADCAST)\n        if (!append_flag(py_retlist, \"broadcast\"))\n            goto error;\n#endif\n#ifdef IFF_DEBUG\n    // Available in (at least) Linux, macOS, BSD\n    if (flags & IFF_DEBUG)\n        if (!append_flag(py_retlist, \"debug\"))\n            goto error;\n#endif\n#ifdef IFF_LOOPBACK\n    // Available in (at least) Linux, macOS, BSD\n    if (flags & IFF_LOOPBACK)\n        if (!append_flag(py_retlist, \"loopback\"))\n            goto error;\n#endif\n#ifdef IFF_POINTOPOINT\n    // Available in (at least) Linux, macOS, BSD\n    if (flags & IFF_POINTOPOINT)\n        if (!append_flag(py_retlist, \"pointopoint\"))\n            goto error;\n#endif\n#ifdef IFF_NOTRAILERS\n    // Available in (at least) Linux, macOS, AIX\n    if (flags & IFF_NOTRAILERS)\n        if (!append_flag(py_retlist, \"notrailers\"))\n            goto error;\n#endif\n#ifdef IFF_RUNNING\n    // Available in (at least) Linux, macOS, AIX, BSD\n    if (flags & IFF_RUNNING)\n        if (!append_flag(py_retlist, \"running\"))\n            goto error;\n#endif\n#ifdef IFF_NOARP\n    // Available in (at least) Linux, macOS, BSD\n    if (flags & IFF_NOARP)\n        if (!append_flag(py_retlist, \"noarp\"))\n            goto error;\n#endif\n#ifdef IFF_PROMISC\n    // Available in (at least) Linux, macOS, BSD\n    if (flags & IFF_PROMISC)\n        if (!append_flag(py_retlist, \"promisc\"))\n            goto error;\n#endif\n#ifdef IFF_ALLMULTI\n    // Available in (at least) Linux, macOS, BSD\n    if (flags & IFF_ALLMULTI)\n        if (!append_flag(py_retlist, \"allmulti\"))\n            goto error;\n#endif\n#ifdef IFF_MASTER\n    // Available in (at least) Linux\n    if (flags & IFF_MASTER)\n        if (!append_flag(py_retlist, \"master\"))\n            goto error;\n#endif\n#ifdef IFF_SLAVE\n    // Available in (at least) Linux\n    if (flags & IFF_SLAVE)\n        if (!append_flag(py_retlist, \"slave\"))\n            goto error;\n#endif\n#ifdef IFF_MULTICAST\n    // Available in (at least) Linux, macOS, BSD\n    if (flags & IFF_MULTICAST)\n        if (!append_flag(py_retlist, \"multicast\"))\n            goto error;\n#endif\n#ifdef IFF_PORTSEL\n    // Available in (at least) Linux\n    if (flags & IFF_PORTSEL)\n        if (!append_flag(py_retlist, \"portsel\"))\n            goto error;\n#endif\n#ifdef IFF_AUTOMEDIA\n    // Available in (at least) Linux\n    if (flags & IFF_AUTOMEDIA)\n        if (!append_flag(py_retlist, \"automedia\"))\n            goto error;\n#endif\n#ifdef IFF_DYNAMIC\n    // Available in (at least) Linux\n    if (flags & IFF_DYNAMIC)\n        if (!append_flag(py_retlist, \"dynamic\"))\n            goto error;\n#endif\n#ifdef IFF_OACTIVE\n    // Available in (at least) macOS, BSD\n    if (flags & IFF_OACTIVE)\n        if (!append_flag(py_retlist, \"oactive\"))\n            goto error;\n#endif\n#ifdef IFF_SIMPLEX\n    // Available in (at least) macOS, AIX, BSD\n    if (flags & IFF_SIMPLEX)\n        if (!append_flag(py_retlist, \"simplex\"))\n            goto error;\n#endif\n#ifdef IFF_LINK0\n    // Available in (at least) macOS, BSD\n    if (flags & IFF_LINK0)\n        if (!append_flag(py_retlist, \"link0\"))\n            goto error;\n#endif\n#ifdef IFF_LINK1\n    // Available in (at least) macOS, BSD\n    if (flags & IFF_LINK1)\n        if (!append_flag(py_retlist, \"link1\"))\n            goto error;\n#endif\n#ifdef IFF_LINK2\n    // Available in (at least) macOS, BSD\n    if (flags & IFF_LINK2)\n        if (!append_flag(py_retlist, \"link2\"))\n            goto error;\n#endif\n#ifdef IFF_D2\n    // Available in (at least) AIX\n    if (flags & IFF_D2)\n        if (!append_flag(py_retlist, \"d2\"))\n            goto error;\n#endif\n\n    return py_retlist;\n\nerror:\n    Py_DECREF(py_retlist);\n    if (sock != -1)\n        close(sock);\n    return NULL;\n}\n\n\n/*\n * Inspect NIC flags, returns a bool indicating whether the NIC is\n * running. References:\n * http://www.i-scream.org/libstatgrab/\n */\nPyObject *\npsutil_net_if_is_running(PyObject *self, PyObject *args) {\n    char *nic_name;\n    int sock = -1;\n    int ret;\n    struct ifreq ifr;\n\n    if (!PyArg_ParseTuple(args, \"s\", &nic_name))\n        return NULL;\n\n    sock = socket(AF_INET, SOCK_DGRAM, 0);\n    if (sock == -1)\n        goto error;\n\n    str_copy(ifr.ifr_name, sizeof(ifr.ifr_name), nic_name);\n    ret = ioctl(sock, SIOCGIFFLAGS, &ifr);\n    if (ret == -1)\n        goto error;\n\n    close(sock);\n    if ((ifr.ifr_flags & IFF_RUNNING) != 0)\n        return Py_BuildValue(\"O\", Py_True);\n    else\n        return Py_BuildValue(\"O\", Py_False);\n\nerror:\n    if (sock != -1)\n        close(sock);\n    return psutil_oserror();\n}\n\n\n// net_if_stats() macOS/BSD implementation.\n#ifdef PSUTIL_HAS_NET_IF_DUPLEX_SPEED\n\nint\npsutil_get_nic_speed(int ifm_active) {\n    // Determine NIC speed. Taken from:\n    // http://www.i-scream.org/libstatgrab/\n    // Assuming only ETHER devices\n    switch (IFM_TYPE(ifm_active)) {\n        case IFM_ETHER:\n            switch (IFM_SUBTYPE(ifm_active)) {\n#if defined(IFM_HPNA_1) \\\n    && ((!defined(IFM_10G_LR)) || (IFM_10G_LR != IFM_HPNA_1))\n                // HomePNA 1.0 (1Mb/s)\n                case (IFM_HPNA_1):\n                    return 1;\n#endif\n                // 10 Mbit\n                case (IFM_10_T):  // 10BaseT - RJ45\n                case (IFM_10_2):  // 10Base2 - Thinnet\n                case (IFM_10_5):  // 10Base5 - AUI\n                case (IFM_10_STP):  // 10BaseT over shielded TP\n                case (IFM_10_FL):  // 10baseFL - Fiber\n                    return 10;\n                // 100 Mbit\n                case (IFM_100_TX):  // 100BaseTX - RJ45\n                case (IFM_100_FX):  // 100BaseFX - Fiber\n                case (IFM_100_T4):  // 100BaseT4 - 4 pair cat 3\n                case (IFM_100_VG):  // 100VG-AnyLAN\n                case (IFM_100_T2):  // 100BaseT2\n                    return 100;\n                // 1000 Mbit\n                case (IFM_1000_SX):  // 1000BaseSX - multi-mode fiber\n                case (IFM_1000_LX):  // 1000baseLX - single-mode fiber\n                case (IFM_1000_CX):  // 1000baseCX - 150ohm STP\n#if defined(IFM_1000_TX) && !defined(PSUTIL_OPENBSD)\n#define HAS_CASE_IFM_1000_TX 1\n                // FreeBSD 4 and others (but NOT OpenBSD) -> #define IFM_1000_T\n                // in net/if_media.h\n                case (IFM_1000_TX):\n#endif\n#ifdef IFM_1000_FX\n                case (IFM_1000_FX):\n#endif\n#if defined(IFM_1000_T) && (!HAS_CASE_IFM_1000_TX || IFM_1000_T != IFM_1000_TX)\n                case (IFM_1000_T):\n#endif\n                    return 1000;\n#if defined(IFM_10G_SR) || defined(IFM_10G_LR) || defined(IFM_10G_CX4) \\\n    || defined(IFM_10G_T)\n#ifdef IFM_10G_SR\n                case (IFM_10G_SR):\n#endif\n#ifdef IFM_10G_LR\n                case (IFM_10G_LR):\n#endif\n#ifdef IFM_10G_CX4\n                case (IFM_10G_CX4):\n#endif\n#ifdef IFM_10G_TWINAX\n                case (IFM_10G_TWINAX):\n#endif\n#ifdef IFM_10G_TWINAX_LONG\n                case (IFM_10G_TWINAX_LONG):\n#endif\n#ifdef IFM_10G_T\n                case (IFM_10G_T):\n#endif\n                    return 10000;\n#endif\n#if defined(IFM_2500_SX)\n#ifdef IFM_2500_SX\n                case (IFM_2500_SX):\n#endif\n                    return 2500;\n#endif  // any 2.5GBit stuff...\n        // We don't know what it is\n                default:\n                    return 0;\n            }\n            break;\n\n#ifdef IFM_TOKEN\n        case IFM_TOKEN:\n            switch (IFM_SUBTYPE(ifm_active)) {\n                case IFM_TOK_STP4:  // Shielded twisted pair 4m - DB9\n                case IFM_TOK_UTP4:  // Unshielded twisted pair 4m - RJ45\n                    return 4;\n                case IFM_TOK_STP16:  // Shielded twisted pair 16m - DB9\n                case IFM_TOK_UTP16:  // Unshielded twisted pair 16m - RJ45\n                    return 16;\n#if defined(IFM_TOK_STP100) || defined(IFM_TOK_UTP100)\n#ifdef IFM_TOK_STP100\n                case IFM_TOK_STP100:  // Shielded twisted pair 100m - DB9\n#endif\n#ifdef IFM_TOK_UTP100\n                case IFM_TOK_UTP100:  // Unshielded twisted pair 100m - RJ45\n#endif\n                    return 100;\n#endif\n                // We don't know what it is\n                default:\n                    return 0;\n            }\n            break;\n#endif\n\n#ifdef IFM_FDDI\n        case IFM_FDDI:\n            switch (IFM_SUBTYPE(ifm_active)) {\n                // We don't know what it is\n                default:\n                    return 0;\n            }\n            break;\n#endif\n        case IFM_IEEE80211:\n            switch (IFM_SUBTYPE(ifm_active)) {\n                case IFM_IEEE80211_FH1:  // Frequency Hopping 1Mbps\n                case IFM_IEEE80211_DS1:  // Direct Sequence 1Mbps\n                    return 1;\n                case IFM_IEEE80211_FH2:  // Frequency Hopping 2Mbps\n                case IFM_IEEE80211_DS2:  // Direct Sequence 2Mbps\n                    return 2;\n                case IFM_IEEE80211_DS5:  // Direct Sequence 5Mbps\n                    return 5;\n                case IFM_IEEE80211_DS11:  // Direct Sequence 11Mbps\n                    return 11;\n                case IFM_IEEE80211_DS22:  // Direct Sequence 22Mbps\n                    return 22;\n                // We don't know what it is\n                default:\n                    return 0;\n            }\n            break;\n\n        default:\n            return 0;\n    }\n}\n\n\n/*\n * Return stats about a particular network interface.\n * References:\n * http://www.i-scream.org/libstatgrab/\n */\nPyObject *\npsutil_net_if_duplex_speed(PyObject *self, PyObject *args) {\n    char *nic_name;\n    int sock = -1;\n    int ret;\n    int duplex;\n    int speed;\n    struct ifreq ifr;\n    struct ifmediareq ifmed;\n\n    if (!PyArg_ParseTuple(args, \"s\", &nic_name))\n        return NULL;\n\n    sock = socket(AF_INET, SOCK_DGRAM, 0);\n    if (sock == -1)\n        return psutil_oserror();\n    str_copy(ifr.ifr_name, sizeof(ifr.ifr_name), nic_name);\n\n    // speed / duplex\n    memset(&ifmed, 0, sizeof(struct ifmediareq));\n    str_copy(ifmed.ifm_name, sizeof(ifmed.ifm_name), nic_name);\n    ret = ioctl(sock, SIOCGIFMEDIA, (caddr_t)&ifmed);\n    if (ret == -1) {\n        speed = 0;\n        duplex = 0;\n    }\n    else {\n        speed = psutil_get_nic_speed(ifmed.ifm_active);\n        if ((ifmed.ifm_active | IFM_FDX) == ifmed.ifm_active)\n            duplex = 2;\n        else if ((ifmed.ifm_active | IFM_HDX) == ifmed.ifm_active)\n            duplex = 1;\n        else\n            duplex = 0;\n    }\n\n    close(sock);\n    return Py_BuildValue(\"[ii]\", duplex, speed);\n}\n#endif  // PSUTIL_HAS_NET_IF_DUPLEX_SPEED\n"},
                          "roles": ["analysisTarget",
                                    "tracedFile"]}],
           "results": [{"ruleId": "-Wanalyzer-out-of-bounds",
                        "taxa": [{"id": "124",
                                  "toolComponent": {"name": "cwe"}}],
                        "properties": {"gcc/analyzer/saved_diagnostic/ploc": {"enode": 1315},
                                       "gcc/analyzer/saved_diagnostic/idx": 0,
                                       "gcc/analyzer/saved_diagnostic/duplicates": [{"properties": {"gcc/analyzer/saved_diagnostic/ploc": {"enode": 1443},
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 1,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "concrete_buffer_underwrite",
                                                                                                    "gcc/analyzer/out_of_bounds/dir": "write",
                                                                                                    "gcc/analyzer/out_of_bounds/model": {"store": {"root region": {"(*INIT_VAL(self))": {"escaped": true,
                                                                                                                                                                                         "touched": true,
                                                                                                                                                                                         "map": {"bytes 0-15": "UNKNOWN(struct PyObject)"}},
                                                                                                                                                                   "(*INIT_VAL(args))": {"escaped": true,
                                                                                                                                                                                         "touched": true,
                                                                                                                                                                                         "map": {"bytes 0-15": "UNKNOWN(struct PyObject)"}}},
                                                                                                                                                   "::": {"_Py_NoneStruct": {"escaped": false,
                                                                                                                                                                             "touched": false,
                                                                                                                                                                             "map": {"bytes 0-3": "UNKNOWN(unsigned int)"}}},
                                                                                                                                                   "frame: ‘psutil_net_if_addrs’@1": {"ifaddr": {"escaped": true,
                                                                                                                                                                                                     "touched": true,
                                                                                                                                                                                                     "map": {"bytes 0-7": "UNKNOWN(struct ifaddrs *)"}},
                                                                                                                                                                                          "_30": {"escaped": false,
                                                                                                                                                                                                  "touched": false,
                                                                                                                                                                                                  "map": {"bytes 0-7": "CONJURED(_30 = PyList_New (0);, _30)"}},
                                                                                                                                                                                          "_38": {"escaped": false,
                                                                                                                                                                                                  "touched": false,
                                                                                                                                                                                                  "map": {"bytes 0-7": "&_Py_NoneStruct"}},
                                                                                                                                                                                          "_36": {"escaped": false,
                                                                                                                                                                                                  "touched": false,
                                                                                                                                                                                                  "map": {"bytes 0-7": "UNKNOWN(struct PyObject *)"}},
                                                                                                                                                                                          "family_34": {"escaped": false,
                                                                                                                                                                                                        "touched": false,
                                                                                                                                                                                                        "map": {"bytes 0-3": "UNKNOWN(int)"}},
                                                                                                                                                                                          "_7": {"escaped": false,
                                                                                                                                                                                                 "touched": false,
                                                                                                                                                                                                 "map": {"bytes 0-7": "UNKNOWN(struct sockaddr * {ref-all})"}},
                                                                                                                                                                                          "ifa_16": {"escaped": false,
                                                                                                                                                                                                     "touched": false,
                                                                                                                                                                                                     "map": {"bytes 0-7": "UNKNOWN(struct ifaddrs *)"}}},
                                                                                                                                                   "frame: ‘psutil_convert_ipaddr’@2": {"ptr_12": {"escaped": false,
                                                                                                                                                                                                       "touched": false,
                                                                                                                                                                                                       "map": {"bytes 0-7": "&buf"}}},
                                                                                                                                                   "called_unknown_fn": true},
                                                                                                                                         "constraints": {"ecs": [{"svals": ["(void *)0B"],
                                                                                                                                                                  "constant": "‘0B’"},
                                                                                                                                                                 {"svals": ["CONJURED(_30 = PyList_New (0);, _30)"]},
                                                                                                                                                                 {"svals": ["&buf"]}],
                                                                                                                                                         "constraints": [{"lhs": 1,
                                                                                                                                                                          "op": "!=",
                                                                                                                                                                          "rhs": 0},
                                                                                                                                                                         {"lhs": 2,
                                                                                                                                                                          "op": "!=",
                                                                                                                                                                          "rhs": 0}],
                                                                                                                                                         "bounded_ranges_constraints": []},
                                                                                                                                         "current_frame": "frame: ‘psutil_convert_ipaddr’@2",
                                                                                                                                         "thrown_exception_stack": [],
                                                                                                                                         "caught_exception_stack": [],
                                                                                                                                         "dynamic_extents": {}},
                                                                                                    "gcc/analyzer/out_of_bounds/region": "buf+(char *)-1B",
                                                                                                    "gcc/analyzer/out_of_bounds/diag_arg": "buf",
                                                                                                    "gcc/analyzer/out_of_bounds/sval_hint": "(char)0",
                                                                                                    "gcc/analyzer/out_of_bounds/region_creation_event_id": null,
                                                                                                    "gcc/analyzer/concrete_out_of_bounds/out_of_bounds_bits": {"start_bit_offset": "-8",
                                                                                                                                                               "size_in_bits": "8"},
                                                                                                    "gcc/analyzer/concrete_out_of_bounds/out_of_bounds_bytes": {"start_byte_offset": "-1",
                                                                                                                                                                "size_in_bytes": "1"}}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/ploc": {"enode": 1753},
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 3,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "concrete_buffer_underwrite",
                                                                                                    "gcc/analyzer/out_of_bounds/dir": "write",
                                                                                                    "gcc/analyzer/out_of_bounds/model": {"store": {"root region": {"(*INIT_VAL(self))": {"escaped": true,
                                                                                                                                                                                         "touched": true,
                                                                                                                                                                                         "map": {"bytes 0-15": "UNKNOWN(struct PyObject)"}},
                                                                                                                                                                   "(*INIT_VAL(args))": {"escaped": true,
                                                                                                                                                                                         "touched": true,
                                                                                                                                                                                         "map": {"bytes 0-15": "UNKNOWN(struct PyObject)"}}},
                                                                                                                                                   "::": {"_Py_NoneStruct": {"escaped": false,
                                                                                                                                                                             "touched": false,
                                                                                                                                                                             "map": {"bytes 0-3": "UNKNOWN(unsigned int)"}}},
                                                                                                                                                   "frame: ‘psutil_net_if_addrs’@1": {"ifaddr": {"escaped": true,
                                                                                                                                                                                                     "touched": true,
                                                                                                                                                                                                     "map": {"bytes 0-7": "UNKNOWN(struct ifaddrs *)"}},
                                                                                                                                                                                          "_30": {"escaped": false,
                                                                                                                                                                                                  "touched": false,
                                                                                                                                                                                                  "map": {"bytes 0-7": "CONJURED(_30 = PyList_New (0);, _30)"}},
                                                                                                                                                                                          "_38": {"escaped": false,
                                                                                                                                                                                                  "touched": false,
                                                                                                                                                                                                  "map": {"bytes 0-7": "&_Py_NoneStruct"}},
                                                                                                                                                                                          "_36": {"escaped": false,
                                                                                                                                                                                                  "touched": false,
                                                                                                                                                                                                  "map": {"bytes 0-7": "UNKNOWN(struct PyObject *)"}},
                                                                                                                                                                                          "family_34": {"escaped": false,
                                                                                                                                                                                                        "touched": false,
                                                                                                                                                                                                        "map": {"bytes 0-3": "UNKNOWN(int)"}},
                                                                                                                                                                                          "_9": {"escaped": false,
                                                                                                                                                                                                 "touched": false,
                                                                                                                                                                                                 "map": {"bytes 0-7": "UNKNOWN(struct sockaddr * {ref-all})"}},
                                                                                                                                                                                          "ifa_16": {"escaped": false,
                                                                                                                                                                                                     "touched": false,
                                                                                                                                                                                                     "map": {"bytes 0-7": "UNKNOWN(struct ifaddrs *)"}}},
                                                                                                                                                   "frame: ‘psutil_convert_ipaddr’@2": {"ptr_12": {"escaped": false,
                                                                                                                                                                                                       "touched": false,
                                                                                                                                                                                                       "map": {"bytes 0-7": "&buf"}}},
                                                                                                                                                   "called_unknown_fn": true},
                                                                                                                                         "constraints": {"ecs": [{"svals": ["(void *)0B"],
                                                                                                                                                                  "constant": "‘0B’"},
                                                                                                                                                                 {"svals": ["CONJURED(_30 = PyList_New (0);, _30)"]},
                                                                                                                                                                 {"svals": ["&buf"]}],
                                                                                                                                                         "constraints": [{"lhs": 1,
                                                                                                                                                                          "op": "!=",
                                                                                                                                                                          "rhs": 0},
                                                                                                                                                                         {"lhs": 2,
                                                                                                                                                                          "op": "!=",
                                                                                                                                                                          "rhs": 0}],
                                                                                                                                                         "bounded_ranges_constraints": []},
                                                                                                                                         "current_frame": "frame: ‘psutil_convert_ipaddr’@2",
                                                                                                                                         "thrown_exception_stack": [],
                                                                                                                                         "caught_exception_stack": [],
                                                                                                                                         "dynamic_extents": {}},
                                                                                                    "gcc/analyzer/out_of_bounds/region": "buf+(char *)-1B",
                                                                                                    "gcc/analyzer/out_of_bounds/diag_arg": "buf",
                                                                                                    "gcc/analyzer/out_of_bounds/sval_hint": "(char)0",
                                                                                                    "gcc/analyzer/out_of_bounds/region_creation_event_id": null,
                                                                                                    "gcc/analyzer/concrete_out_of_bounds/out_of_bounds_bits": {"start_bit_offset": "-8",
                                                                                                                                                               "size_in_bits": "8"},
                                                                                                    "gcc/analyzer/concrete_out_of_bounds/out_of_bounds_bytes": {"start_byte_offset": "-1",
                                                                                                                                                                "size_in_bytes": "1"}}}],
                                       "gcc/analyzer/pending_diagnostic/kind": "concrete_buffer_underwrite",
                                       "gcc/analyzer/out_of_bounds/dir": "write",
                                       "gcc/analyzer/out_of_bounds/model": {"store": {"root region": {"(*INIT_VAL(self))": {"escaped": true,
                                                                                                                            "touched": true,
                                                                                                                            "map": {"bytes 0-15": "UNKNOWN(struct PyObject)"}},
                                                                                                      "(*INIT_VAL(args))": {"escaped": true,
                                                                                                                            "touched": true,
                                                                                                                            "map": {"bytes 0-15": "UNKNOWN(struct PyObject)"}}},
                                                                                      "::": {"_Py_NoneStruct": {"escaped": false,
                                                                                                                "touched": false,
                                                                                                                "map": {"bytes 0-3": "UNKNOWN(unsigned int)"}}},
                                                                                      "frame: ‘psutil_net_if_addrs’@1": {"ifaddr": {"escaped": true,
                                                                                                                                        "touched": true,
                                                                                                                                        "map": {"bytes 0-7": "UNKNOWN(struct ifaddrs *)"}},
                                                                                                                             "_30": {"escaped": false,
                                                                                                                                     "touched": false,
                                                                                                                                     "map": {"bytes 0-7": "CONJURED(_30 = PyList_New (0);, _30)"}},
                                                                                                                             "_36": {"escaped": false,
                                                                                                                                     "touched": false,
                                                                                                                                     "map": {"bytes 0-7": "UNKNOWN(struct PyObject *)"}},
                                                                                                                             "_4": {"escaped": false,
                                                                                                                                    "touched": false,
                                                                                                                                    "map": {"bytes 0-7": "UNKNOWN(struct sockaddr * {ref-all})"}},
                                                                                                                             "family_34": {"escaped": false,
                                                                                                                                           "touched": false,
                                                                                                                                           "map": {"bytes 0-3": "UNKNOWN(int)"}},
                                                                                                                             "ifa_16": {"escaped": false,
                                                                                                                                        "touched": false,
                                                                                                                                        "map": {"bytes 0-7": "UNKNOWN(struct ifaddrs *)"}}},
                                                                                      "frame: ‘psutil_convert_ipaddr’@2": {"ptr_12": {"escaped": false,
                                                                                                                                          "touched": false,
                                                                                                                                          "map": {"bytes 0-7": "&buf"}}},
                                                                                      "called_unknown_fn": true},
                                                                            "constraints": {"ecs": [{"svals": ["(void *)0B"],
                                                                                                     "constant": "‘0B’"},
                                                                                                    {"svals": ["CONJURED(_30 = PyList_New (0);, _30)"]},
                                                                                                    {"svals": ["&buf"]}],
                                                                                            "constraints": [{"lhs": 1,
                                                                                                             "op": "!=",
                                                                                                             "rhs": 0},
                                                                                                            {"lhs": 2,
                                                                                                             "op": "!=",
                                                                                                             "rhs": 0}],
                                                                                            "bounded_ranges_constraints": []},
                                                                            "current_frame": "frame: ‘psutil_convert_ipaddr’@2",
                                                                            "thrown_exception_stack": [],
                                                                            "caught_exception_stack": [],
                                                                            "dynamic_extents": {}},
                                       "gcc/analyzer/out_of_bounds/region": "buf+(char *)-1B",
                                       "gcc/analyzer/out_of_bounds/diag_arg": "buf",
                                       "gcc/analyzer/out_of_bounds/sval_hint": "(char)0",
                                       "gcc/analyzer/out_of_bounds/region_creation_event_id": "(16)",
                                       "gcc/analyzer/concrete_out_of_bounds/out_of_bounds_bits": {"start_bit_offset": "-8",
                                                                                                  "size_in_bits": "8"},
                                       "gcc/analyzer/concrete_out_of_bounds/out_of_bounds_bytes": {"start_byte_offset": "-1",
                                                                                                   "size_in_bytes": "1"}},
                        "level": "warning",
                        "message": {"text": "stack-based buffer underwrite"},
                        "locations": [{"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                 "uriBaseId": "PWD"},
                                                            "region": {"startLine": 116,
                                                                       "startColumn": 9,
                                                                       "endColumn": 22},
                                                            "contextRegion": {"startLine": 116,
                                                                              "snippet": {"text": "        *--ptr = '\\0';\n"}}},
                                       "logicalLocations": [{"index": 0,
                                                             "fullyQualifiedName": "psutil_convert_ipaddr"}]}],
                        "codeFlows": [{"threadFlows": [{"id": "main",
                                                        "locations": [{"properties": {"gcc/analyzer/checker_event/emission_id": "(1)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 131,
                                                                                                                    "startColumn": 1,
                                                                                                                    "endColumn": 20},
                                                                                                         "contextRegion": {"startLine": 131,
                                                                                                                           "snippet": {"text": "psutil_net_if_addrs(PyObject *self, PyObject *args) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "psutil_net_if_addrs"}],
                                                                                    "message": {"text": "entry to ‘psutil_net_if_addrs’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 1},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(2)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 298,
                                                                                                                                 "dst_id": 300}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 142,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 142,
                                                                                                                           "snippet": {"text": "    if (py_retlist == NULL)\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "psutil_net_if_addrs"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 2},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(3)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 298,
                                                                                                                                 "dst_id": 300}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 144,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 28},
                                                                                                         "contextRegion": {"startLine": 144,
                                                                                                                           "snippet": {"text": "    if (getifaddrs(&ifaddr) == -1) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "psutil_net_if_addrs"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 3},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(4)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 301,
                                                                                                                                 "dst_id": 305}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 144,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 144,
                                                                                                                           "snippet": {"text": "    if (getifaddrs(&ifaddr) == -1) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "psutil_net_if_addrs"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 4},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(5)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 301,
                                                                                                                                 "dst_id": 305}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 149,
                                                                                                                    "startColumn": 10,
                                                                                                                    "endColumn": 22},
                                                                                                         "contextRegion": {"startLine": 149,
                                                                                                                           "snippet": {"text": "    for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "psutil_net_if_addrs"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 5},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(6)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 310,
                                                                                                                                 "dst_id": 311}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 149,
                                                                                                                    "startColumn": 24,
                                                                                                                    "endColumn": 32},
                                                                                                         "contextRegion": {"startLine": 149,
                                                                                                                           "snippet": {"text": "    for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "psutil_net_if_addrs"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘ifa’ is non-NULL)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 6},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(7)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 310,
                                                                                                                                 "dst_id": 311}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 150,
                                                                                                                    "startColumn": 14,
                                                                                                                    "endColumn": 27},
                                                                                                         "contextRegion": {"startLine": 150,
                                                                                                                           "snippet": {"text": "        if (!ifa->ifa_addr)\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "psutil_net_if_addrs"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 7},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(8)",
                                                                                      "gcc/analyzer/checker_event/kind": "call",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 317,
                                                                                                                                 "dst_id": 318}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 153,
                                                                                                                    "startColumn": 22,
                                                                                                                    "endColumn": 66},
                                                                                                         "contextRegion": {"startLine": 153,
                                                                                                                           "snippet": {"text": "        py_address = psutil_convert_ipaddr(ifa->ifa_addr, family);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "psutil_net_if_addrs"}],
                                                                                    "message": {"text": "calling ‘psutil_convert_ipaddr’ from ‘psutil_net_if_addrs’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 8},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(9)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 54,
                                                                                                                    "startColumn": 1,
                                                                                                                    "endColumn": 22},
                                                                                                         "contextRegion": {"startLine": 54,
                                                                                                                           "snippet": {"text": "psutil_convert_ipaddr(struct sockaddr *addr, int family) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "entry to ‘psutil_convert_ipaddr’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 9},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(10)",
                                                                                      "gcc/analyzer/checker_event/kind": "region_creation"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 55,
                                                                                                                    "startColumn": 10,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 55,
                                                                                                                           "snippet": {"text": "    char buf[NI_MAXHOST];\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "capacity: 1025 bytes"}},
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 10},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(11)",
                                                                                      "gcc/analyzer/checker_event/kind": "return"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 153,
                                                                                                                    "startColumn": 22,
                                                                                                                    "endColumn": 66},
                                                                                                         "contextRegion": {"startLine": 153,
                                                                                                                           "snippet": {"text": "        py_address = psutil_convert_ipaddr(ifa->ifa_addr, family);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "psutil_net_if_addrs"}],
                                                                                    "message": {"text": "returning to ‘psutil_net_if_addrs’ from ‘psutil_convert_ipaddr’"}},
                                                                       "kinds": ["return",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 11},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(12)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 321,
                                                                                                                                 "dst_id": 324}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 158,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 158,
                                                                                                                           "snippet": {"text": "        if (py_address == NULL)\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "psutil_net_if_addrs"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 12},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(13)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 321,
                                                                                                                                 "dst_id": 324}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 160,
                                                                                                                    "startColumn": 22,
                                                                                                                    "endColumn": 69},
                                                                                                         "contextRegion": {"startLine": 160,
                                                                                                                           "snippet": {"text": "        py_netmask = psutil_convert_ipaddr(ifa->ifa_netmask, family);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "psutil_net_if_addrs"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 13},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(14)",
                                                                                      "gcc/analyzer/checker_event/kind": "call",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 325,
                                                                                                                                 "dst_id": 326}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 160,
                                                                                                                    "startColumn": 22,
                                                                                                                    "endColumn": 69},
                                                                                                         "contextRegion": {"startLine": 160,
                                                                                                                           "snippet": {"text": "        py_netmask = psutil_convert_ipaddr(ifa->ifa_netmask, family);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "psutil_net_if_addrs"}],
                                                                                    "message": {"text": "calling ‘psutil_convert_ipaddr’ from ‘psutil_net_if_addrs’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 14},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(15)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 54,
                                                                                                                    "startColumn": 1,
                                                                                                                    "endColumn": 22},
                                                                                                         "contextRegion": {"startLine": 54,
                                                                                                                           "snippet": {"text": "psutil_convert_ipaddr(struct sockaddr *addr, int family) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "entry to ‘psutil_convert_ipaddr’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 15},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(16)",
                                                                                      "gcc/analyzer/checker_event/kind": "region_creation"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 55,
                                                                                                                    "startColumn": 10,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 55,
                                                                                                                           "snippet": {"text": "    char buf[NI_MAXHOST];\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "capacity: 1025 bytes"}},
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 16},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(17)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 483,
                                                                                                                                 "dst_id": 490}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 63,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 63,
                                                                                                                           "snippet": {"text": "    if (addr == NULL) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘addr’ is non-NULL)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 17},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(18)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 483,
                                                                                                                                 "dst_id": 490}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 67,
                                                                                                                    "startColumn": 14,
                                                                                                                    "endColumn": 25},
                                                                                                         "contextRegion": {"startLine": 67,
                                                                                                                           "snippet": {"text": "    else if (family == AF_INET || family == AF_INET6) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 18},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(19)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 493,
                                                                                                                                 "dst_id": 510}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 67,
                                                                                                                    "startColumn": 13,
                                                                                                                    "endColumn": 14},
                                                                                                         "contextRegion": {"startLine": 67,
                                                                                                                           "snippet": {"text": "    else if (family == AF_INET || family == AF_INET6) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 19},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(20)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 493,
                                                                                                                                 "dst_id": 510}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 89,
                                                                                                                    "startColumn": 13,
                                                                                                                    "endColumn": 14},
                                                                                                         "contextRegion": {"startLine": 89,
                                                                                                                           "snippet": {"text": "    else if (family == AF_PACKET) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 20},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(21)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 510,
                                                                                                                                 "dst_id": 511}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 89,
                                                                                                                    "startColumn": 13,
                                                                                                                    "endColumn": 14},
                                                                                                         "contextRegion": {"startLine": 89,
                                                                                                                           "snippet": {"text": "    else if (family == AF_PACKET) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘family == 17’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 21},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(22)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 510,
                                                                                                                                 "dst_id": 511}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 91,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 32},
                                                                                                         "contextRegion": {"startLine": 91,
                                                                                                                           "snippet": {"text": "        len = lladdr->sll_halen;\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 22},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(23)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 514,
                                                                                                                                 "dst_id": 536}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 110,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 110,
                                                                                                                           "snippet": {"text": "    if (len > 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘len != 0’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 23},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(24)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 514,
                                                                                                                                 "dst_id": 536}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 110,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 110,
                                                                                                                           "snippet": {"text": "    if (len > 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 24},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(25)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 538,
                                                                                                                                 "dst_id": 548}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 112,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 28},
                                                                                                         "contextRegion": {"startLine": 112,
                                                                                                                           "snippet": {"text": "        for (n = 0; n < len; ++n) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘n >= len’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 25},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(26)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 538,
                                                                                                                                 "dst_id": 548}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 116,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 22},
                                                                                                         "contextRegion": {"startLine": 116,
                                                                                                                           "snippet": {"text": "        *--ptr = '\\0';\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 26},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(27)",
                                                                                      "gcc/analyzer/checker_event/kind": "warning"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 116,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 22},
                                                                                                         "contextRegion": {"startLine": 116,
                                                                                                                           "snippet": {"text": "        *--ptr = '\\0';\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "psutil_convert_ipaddr"}],
                                                                                    "message": {"text": "out-of-bounds write at byte -1 but ‘buf’ starts at byte 0"}},
                                                                       "kinds": ["danger"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 27}]}]}],
                        "relatedLocations": [{"physicalLocation": {"artifactLocation": {"uri": "psutil/arch/posix/net.c",
                                                                                        "uriBaseId": "PWD"},
                                                                   "region": {"startLine": 116,
                                                                              "startColumn": 9,
                                                                              "endColumn": 22},
                                                                   "contextRegion": {"startLine": 116,
                                                                                     "snippet": {"text": "        *--ptr = '\\0';\n"}}},
                                              "message": {"text": "valid subscripts for ‘buf’ are ‘[0]’ to ‘[1024]’"},
                                              "properties": {"nestingLevel": 0}}]}],
           "logicalLocations": [{"name": "psutil_convert_ipaddr",
                                 "fullyQualifiedName": "psutil_convert_ipaddr",
                                 "decoratedName": "psutil_convert_ipaddr",
                                 "kind": "function",
                                 "index": 0},
                                {"name": "psutil_net_if_addrs",
                                 "fullyQualifiedName": "psutil_net_if_addrs",
                                 "decoratedName": "psutil_net_if_addrs",
                                 "kind": "function",
                                 "index": 1}]}]}
