{"$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 20260703 (Red Hat 16.1.1-4) (x86_64-redhat-linux)",
                               "version": "16.1.1 20260703 (Red Hat 16.1.1-4)",
                               "informationUri": "https://gcc.gnu.org/gcc-16/",
                               "rules": [{"id": "-Wanalyzer-possible-null-argument",
                                          "helpUri": "https://gcc.gnu.org/onlinedocs/gcc-16.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-possible-null-argument"}]}},
           "taxonomies": [{"name": "CWE",
                           "version": "4.7",
                           "organization": "MITRE",
                           "shortDescription": {"text": "The MITRE Common Weakness Enumeration"},
                           "taxa": [{"id": "690",
                                     "helpUri": "https://cwe.mitre.org/data/definitions/690.html"}]}],
           "invocations": [{"arguments": ["/usr/libexec/gcc/x86_64-redhat-linux/16/cc1",
                                          "-quiet",
                                          "-I",
                                          "../src/include/",
                                          "-D",
                                          "_GNU_SOURCE",
                                          "-D",
                                          "__SANE_USERSPACE_TYPES__",
                                          "-D",
                                          "_LARGEFILE_SOURCE",
                                          "-D",
                                          "_FILE_OFFSET_BITS=64",
                                          "-D",
                                          "LIBURING_BUILD_TEST",
                                          "-include",
                                          "../config-host.h",
                                          "fixed-buf-iter.c",
                                          "-quiet",
                                          "-dumpbase",
                                          "fixed-buf-iter.c",
                                          "-dumpbase-ext",
                                          ".c",
                                          "-m64",
                                          "-mtune=generic",
                                          "-march=x86-64",
                                          "-mtls-dialect=gnu2",
                                          "-O2",
                                          "-Wno-unused-parameter",
                                          "-Wno-sign-compare",
                                          "-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",
                                          "-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/2278-7jND.sarif",
                                          "-o",
                                          "/tmp/ccrMY8KP.s"],
                            "workingDirectory": {"uri": "/builddir/build/BUILD/liburing-2.13-build/liburing-2.13/test"},
                            "startTimeUtc": "2026-08-03T18:01:43Z",
                            "executionSuccessful": true,
                            "toolExecutionNotifications": [],
                            "endTimeUtc": "2026-08-03T18:01:44Z"}],
           "originalUriBaseIds": {"PWD": {"uri": "file:///builddir/build/BUILD/liburing-2.13-build/liburing-2.13/test/"}},
           "artifacts": [{"location": {"uri": "fixed-buf-iter.c",
                                       "uriBaseId": "PWD"},
                          "sourceLanguage": "c",
                          "contents": {"text": "/* SPDX-License-Identifier: MIT */\n/*\n * Test fixed buffers with non-iterators.\n *\n * Taken from: https://github.com/axboe/liburing/issues/549\n */\n#include <stdio.h>\n#include <string.h>\n#include <fcntl.h>\n#include <stdlib.h>\n\n#include \"liburing.h\"\n#include \"helpers.h\"\n\n#define BUF_SIZE    4096\n#define BUFFERS     1\n#define IN_FD       \"/dev/urandom\"\n#define OUT_FD      \"/dev/zero\"\n\nstatic int test(struct io_uring *ring)\n{\n\tstruct iovec iov[BUFFERS];\n\tstruct io_uring_sqe *sqe;\n\tstruct io_uring_cqe *cqe;\n\tint ret, fd_in, fd_out, i;\n\n\tfd_in = open(IN_FD, O_RDONLY, 0644);\n\tif (fd_in < 0) {\n\t\tperror(\"open in\");\n\t\treturn 1;\n\t}\n\n\tfd_out = open(OUT_FD, O_RDWR, 0644);\n\tif (fd_out < 0) {\n\t\tperror(\"open out\");\n\t\treturn 1;\n\t}\n\n\tfor (i = 0; i < BUFFERS; i++) {\n\t\tiov[i].iov_base = malloc(BUF_SIZE);\n\t\tiov[i].iov_len = BUF_SIZE;\n\t\tmemset(iov[i].iov_base, 0, BUF_SIZE);\n\t}\n\n\tret = io_uring_register_buffers(ring, iov, BUFFERS);\n\tif (ret) {\n\t\tfprintf(stderr, \"Error registering buffers: %s\", strerror(-ret));\n\t\treturn 1;\n\t}\n\n\tsqe = io_uring_get_sqe(ring);\n\tif (!sqe) {\n\t\tfprintf(stderr, \"Could not get SQE.\\n\");\n\t\treturn 1;\n\t}\n\n\tio_uring_prep_read_fixed(sqe, fd_in, iov[0].iov_base, BUF_SIZE, 0, 0);\n\tio_uring_submit(ring);\n\n\tret = io_uring_wait_cqe(ring, &cqe);\n\tif (ret < 0) {\n\t\tfprintf(stderr, \"Error waiting for completion: %s\\n\", strerror(-ret));\n\t\treturn 1;\n\t}\n\n\tif (cqe->res < 0) {\n\t\tfprintf(stderr, \"Error in async operation: %s\\n\", strerror(-cqe->res));\n\t\treturn 1;\n\t}\n\tio_uring_cqe_seen(ring, cqe);\n\n\tsqe = io_uring_get_sqe(ring);\n\tif (!sqe) {\n\t\tfprintf(stderr, \"Could not get SQE.\\n\");\n\t\treturn 1;\n\t}\n\tio_uring_prep_write_fixed(sqe, fd_out, iov[0].iov_base, BUF_SIZE, 0, 0);\n\tio_uring_submit(ring);\n\n\tret = io_uring_wait_cqe(ring, &cqe);\n\tif (ret < 0) {\n\t\tfprintf(stderr, \"Error waiting for completion: %s\\n\", strerror(-ret));\n\t\treturn 1;\n\t}\n\tif (cqe->res < 0) {\n\t\tfprintf(stderr, \"Error in async operation: %s\\n\", strerror(-cqe->res));\n\t\treturn 1;\n\t}\n\tio_uring_cqe_seen(ring, cqe);\n\tfor (i = 0; i < BUFFERS; i++)\n\t\tfree(iov[i].iov_base);\n\treturn 0;\n}\n\nint main(int argc, char *argv[])\n{\n\tstruct io_uring ring;\n\tint ret;\n\n\tif (argc > 1)\n\t\treturn T_EXIT_SKIP;\n\n\tret = t_create_ring(8, &ring, 0);\n\tif (ret == T_SETUP_SKIP)\n\t\treturn T_EXIT_SKIP;\n\telse if (ret < 0)\n\t\treturn T_EXIT_FAIL;\n\n\tret = test(&ring);\n\tif (ret) {\n\t\tfprintf(stderr, \"Test failed\\n\");\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tio_uring_queue_exit(&ring);\n\treturn T_EXIT_PASS;\n}\n"},
                          "roles": ["analysisTarget",
                                    "tracedFile"]},
                         {"location": {"uri": "/usr/include/string.h"},
                          "sourceLanguage": "c",
                          "contents": {"text": "/* Copyright (C) 1991-2026 Free Software Foundation, Inc.\n   This file is part of the GNU C Library.\n\n   The GNU C Library is free software; you can redistribute it and/or\n   modify it under the terms of the GNU Lesser General Public\n   License as published by the Free Software Foundation; either\n   version 2.1 of the License, or (at your option) any later version.\n\n   The GNU C Library is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n   Lesser General Public License for more details.\n\n   You should have received a copy of the GNU Lesser General Public\n   License along with the GNU C Library; if not, see\n   <https://www.gnu.org/licenses/>.  */\n\n/*\n *\tISO C99 Standard: 7.21 String handling\t<string.h>\n */\n\n#ifndef\t_STRING_H\n#define\t_STRING_H\t1\n\n#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION\n#include <bits/libc-header-start.h>\n\n__BEGIN_DECLS\n\n#if __GLIBC_USE (ISOC23)\n# define __STDC_VERSION_STRING_H__ 202311L\n#endif\n\n/* Get size_t and NULL from <stddef.h>.  */\n#define\t__need_size_t\n#define\t__need_NULL\n#include <stddef.h>\n\n/* Tell the caller that we provide correct C++ prototypes.  */\n#if defined __cplusplus && (__GNUC_PREREQ (4, 4) \\\n\t\t\t    || __glibc_clang_prereq (3, 5))\n# define __CORRECT_ISO_CPP_STRING_H_PROTO\n#endif\n\n\n/* Copy N bytes of SRC to DEST.  */\nextern void *memcpy (void *__restrict __dest, const void *__restrict __src,\n\t\t     size_t __n) __THROW __nonnull ((1, 2));\n/* Copy N bytes of SRC to DEST, guaranteeing\n   correct behavior for overlapping strings.  */\nextern void *memmove (void *__dest, const void *__src, size_t __n)\n     __THROW __nonnull ((1, 2));\n\n/* Copy no more than N bytes of SRC to DEST, stopping when C is found.\n   Return the position in DEST one byte past where C was copied,\n   or NULL if C was not found in the first N bytes of SRC.  */\n#if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC23)\nextern void *memccpy (void *__restrict __dest, const void *__restrict __src,\n\t\t      int __c, size_t __n)\n    __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 4));\n#endif /* Misc || X/Open.  */\n\n\n/* Set N bytes of S to C.  */\nextern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));\n\n#if defined __USE_MISC || __GLIBC_USE (ISOC23)\n/* Like memset, but the compiler will not delete a call to this\n   function, even if S is dead after the call.  */\nextern void *memset_explicit (void *__s, int __c, size_t __n)\n     __THROW __nonnull ((1)) __fortified_attr_access (__write_only__, 1, 3);\n#endif\n\n/* Compare N bytes of S1 and S2.  */\nextern int memcmp (const void *__s1, const void *__s2, size_t __n)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n\n/* Compare N bytes of S1 and S2.  Return zero if S1 and S2 are equal.\n   Return some non-zero value otherwise.\n\n   Essentially __memcmpeq has the exact same semantics as memcmp\n   except the return value is less constrained.  memcmp is always a\n   correct implementation of __memcmpeq.  As well !!memcmp, -memcmp,\n   or bcmp are correct implementations.\n\n   __memcmpeq is meant to be used by compilers when memcmp return is\n   only used for its boolean value.\n\n   __memcmpeq is declared only for use by compilers.  Programs should\n   continue to use memcmp.  */\nextern int __memcmpeq (const void *__s1, const void *__s2, size_t __n)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n\n/* Search N bytes of S for C.  */\n#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\"\n{\nextern void *memchr (void *__s, int __c, size_t __n)\n      __THROW __asm (\"memchr\") __attribute_pure__ __nonnull ((1));\nextern const void *memchr (const void *__s, int __c, size_t __n)\n      __THROW __asm (\"memchr\") __attribute_pure__ __nonnull ((1));\n\n# ifdef __OPTIMIZE__\n__extern_always_inline void *\nmemchr (void *__s, int __c, size_t __n) __THROW\n{\n  return __builtin_memchr (__s, __c, __n);\n}\n\n__extern_always_inline const void *\nmemchr (const void *__s, int __c, size_t __n) __THROW\n{\n  return __builtin_memchr (__s, __c, __n);\n}\n# endif\n}\n#else\nextern void *memchr (const void *__s, int __c, size_t __n)\n      __THROW __attribute_pure__ __nonnull ((1));\n# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC\n#  define memchr(S, C, N)\t\t\t\t\t\\\n  __glibc_const_generic (S, const void *, memchr (S, C, N))\n# endif\n#endif\n\n#ifdef __USE_GNU\n/* Search in S for C.  This is similar to `memchr' but there is no\n   length limit.  */\n# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\" void *rawmemchr (void *__s, int __c)\n     __THROW __asm (\"rawmemchr\") __attribute_pure__ __nonnull ((1));\nextern \"C++\" const void *rawmemchr (const void *__s, int __c)\n     __THROW __asm (\"rawmemchr\") __attribute_pure__ __nonnull ((1));\n# else\nextern void *rawmemchr (const void *__s, int __c)\n     __THROW __attribute_pure__ __nonnull ((1));\n# endif\n\n/* Search N bytes of S for the final occurrence of C.  */\n# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\" void *memrchr (void *__s, int __c, size_t __n)\n      __THROW __asm (\"memrchr\") __attribute_pure__ __nonnull ((1))\n      __attr_access ((__read_only__, 1, 3));\nextern \"C++\" const void *memrchr (const void *__s, int __c, size_t __n)\n      __THROW __asm (\"memrchr\") __attribute_pure__ __nonnull ((1))\n      __attr_access ((__read_only__, 1, 3));\n# else\nextern void *memrchr (const void *__s, int __c, size_t __n)\n      __THROW __attribute_pure__ __nonnull ((1))\n      __attr_access ((__read_only__, 1, 3));\n# endif\n#endif\n\n\n/* Copy SRC to DEST.  */\nextern char *strcpy (char *__restrict __dest, const char *__restrict __src)\n     __THROW __nonnull ((1, 2));\n/* Copy no more than N characters of SRC to DEST.  */\nextern char *strncpy (char *__restrict __dest,\n\t\t      const char *__restrict __src, size_t __n)\n     __THROW __nonnull ((1, 2));\n\n/* Append SRC onto DEST.  */\nextern char *strcat (char *__restrict __dest, const char *__restrict __src)\n     __THROW __nonnull ((1, 2));\n/* Append no more than N characters from SRC onto DEST.  */\nextern char *strncat (char *__restrict __dest, const char *__restrict __src,\n\t\t      size_t __n) __THROW __nonnull ((1, 2));\n\n/* Compare S1 and S2.  */\nextern int strcmp (const char *__s1, const char *__s2)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n/* Compare N characters of S1 and S2.  */\nextern int strncmp (const char *__s1, const char *__s2, size_t __n)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n\n/* Compare the collated forms of S1 and S2.  */\nextern int strcoll (const char *__s1, const char *__s2)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n/* Put a transformation of SRC into no more than N bytes of DEST.  */\nextern size_t strxfrm (char *__restrict __dest,\n\t\t       const char *__restrict __src, size_t __n)\n    __THROW __nonnull ((2)) __attr_access ((__write_only__, 1, 3));\n\n#ifdef __USE_XOPEN2K8\n/* POSIX.1-2008 extended locale interface (see locale.h).  */\n# include <bits/types/locale_t.h>\n\n/* Compare the collated forms of S1 and S2, using sorting rules from L.  */\nextern int strcoll_l (const char *__s1, const char *__s2, locale_t __l)\n     __THROW __attribute_pure__ __nonnull ((1, 2, 3));\n/* Put a transformation of SRC into no more than N bytes of DEST,\n   using sorting rules from L.  */\nextern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,\n\t\t\t locale_t __l) __THROW __nonnull ((2, 4))\n     __attr_access ((__write_only__, 1, 3));\n#endif\n\n#if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8\t\\\n     || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC23))\n/* Duplicate S, returning an identical malloc'd string.  */\nextern char *strdup (const char *__s)\n     __THROW __attribute_malloc__ __nonnull ((1));\n#endif\n\n/* Return a malloc'd copy of at most N bytes of STRING.  The\n   resultant string is terminated even if no null terminator\n   appears before STRING[N].  */\n#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC23)\nextern char *strndup (const char *__string, size_t __n)\n     __THROW __attribute_malloc__ __nonnull ((1));\n#endif\n\n#if defined __USE_GNU && defined __GNUC__\n/* Duplicate S, returning an identical alloca'd string.  */\n# define strdupa(s)\t\t\t\t\t\t\t      \\\n  (__extension__\t\t\t\t\t\t\t      \\\n    ({\t\t\t\t\t\t\t\t\t      \\\n      const char *__old = (s);\t\t\t\t\t\t      \\\n      size_t __len = strlen (__old) + 1;\t\t\t\t      \\\n      char *__new = (char *) __builtin_alloca (__len);\t\t\t      \\\n      (char *) memcpy (__new, __old, __len);\t\t\t\t      \\\n    }))\n\n/* Return an alloca'd copy of at most N bytes of string.  */\n# define strndupa(s, n)\t\t\t\t\t\t\t      \\\n  (__extension__\t\t\t\t\t\t\t      \\\n    ({\t\t\t\t\t\t\t\t\t      \\\n      const char *__old = (s);\t\t\t\t\t\t      \\\n      size_t __len = strnlen (__old, (n));\t\t\t\t      \\\n      char *__new = (char *) __builtin_alloca (__len + 1);\t\t      \\\n      __new[__len] = '\\0';\t\t\t\t\t\t      \\\n      (char *) memcpy (__new, __old, __len);\t\t\t\t      \\\n    }))\n#endif\n\n/* Find the first occurrence of C in S.  */\n#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\"\n{\nextern char *strchr (char *__s, int __c)\n     __THROW __asm (\"strchr\") __attribute_pure__ __nonnull ((1));\nextern const char *strchr (const char *__s, int __c)\n     __THROW __asm (\"strchr\") __attribute_pure__ __nonnull ((1));\n\n# ifdef __OPTIMIZE__\n__extern_always_inline char *\nstrchr (char *__s, int __c) __THROW\n{\n  return __builtin_strchr (__s, __c);\n}\n\n__extern_always_inline const char *\nstrchr (const char *__s, int __c) __THROW\n{\n  return __builtin_strchr (__s, __c);\n}\n# endif\n}\n#else\nextern char *strchr (const char *__s, int __c)\n     __THROW __attribute_pure__ __nonnull ((1));\n# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC\n#  define strchr(S, C)\t\t\t\t\t\t\\\n  __glibc_const_generic (S, const char *, strchr (S, C))\n# endif\n#endif\n/* Find the last occurrence of C in S.  */\n#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\"\n{\nextern char *strrchr (char *__s, int __c)\n     __THROW __asm (\"strrchr\") __attribute_pure__ __nonnull ((1));\nextern const char *strrchr (const char *__s, int __c)\n     __THROW __asm (\"strrchr\") __attribute_pure__ __nonnull ((1));\n\n# ifdef __OPTIMIZE__\n__extern_always_inline char *\nstrrchr (char *__s, int __c) __THROW\n{\n  return __builtin_strrchr (__s, __c);\n}\n\n__extern_always_inline const char *\nstrrchr (const char *__s, int __c) __THROW\n{\n  return __builtin_strrchr (__s, __c);\n}\n# endif\n}\n#else\nextern char *strrchr (const char *__s, int __c)\n     __THROW __attribute_pure__ __nonnull ((1));\n# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC\n#  define strrchr(S, C)\t\t\t\t\t\t\\\n  __glibc_const_generic (S, const char *, strrchr (S, C))\n# endif\n#endif\n\n#ifdef __USE_MISC\n/* This function is similar to `strchr'.  But it returns a pointer to\n   the closing NUL byte in case C is not found in S.  */\n# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\" char *strchrnul (char *__s, int __c)\n     __THROW __asm (\"strchrnul\") __attribute_pure__ __nonnull ((1));\nextern \"C++\" const char *strchrnul (const char *__s, int __c)\n     __THROW __asm (\"strchrnul\") __attribute_pure__ __nonnull ((1));\n# else\nextern char *strchrnul (const char *__s, int __c)\n     __THROW __attribute_pure__ __nonnull ((1));\n# endif\n#endif\n\n/* Return the length of the initial segment of S which\n   consists entirely of characters not in REJECT.  */\nextern size_t strcspn (const char *__s, const char *__reject)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n/* Return the length of the initial segment of S which\n   consists entirely of characters in ACCEPT.  */\nextern size_t strspn (const char *__s, const char *__accept)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n/* Find the first occurrence in S of any character in ACCEPT.  */\n#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\"\n{\nextern char *strpbrk (char *__s, const char *__accept)\n     __THROW __asm (\"strpbrk\") __attribute_pure__ __nonnull ((1, 2));\nextern const char *strpbrk (const char *__s, const char *__accept)\n     __THROW __asm (\"strpbrk\") __attribute_pure__ __nonnull ((1, 2));\n\n# ifdef __OPTIMIZE__\n__extern_always_inline char *\nstrpbrk (char *__s, const char *__accept) __THROW\n{\n  return __builtin_strpbrk (__s, __accept);\n}\n\n__extern_always_inline const char *\nstrpbrk (const char *__s, const char *__accept) __THROW\n{\n  return __builtin_strpbrk (__s, __accept);\n}\n# endif\n}\n#else\nextern char *strpbrk (const char *__s, const char *__accept)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC\n#  define strpbrk(S, ACCEPT)\t\t\t\t\t\\\n  __glibc_const_generic (S, const char *, strpbrk (S, ACCEPT))\n# endif\n#endif\n/* Find the first occurrence of NEEDLE in HAYSTACK.  */\n#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\"\n{\nextern char *strstr (char *__haystack, const char *__needle)\n     __THROW __asm (\"strstr\") __attribute_pure__ __nonnull ((1, 2));\nextern const char *strstr (const char *__haystack, const char *__needle)\n     __THROW __asm (\"strstr\") __attribute_pure__ __nonnull ((1, 2));\n\n# ifdef __OPTIMIZE__\n__extern_always_inline char *\nstrstr (char *__haystack, const char *__needle) __THROW\n{\n  return __builtin_strstr (__haystack, __needle);\n}\n\n__extern_always_inline const char *\nstrstr (const char *__haystack, const char *__needle) __THROW\n{\n  return __builtin_strstr (__haystack, __needle);\n}\n# endif\n}\n#else\nextern char *strstr (const char *__haystack, const char *__needle)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC\n#  define strstr(HAYSTACK, NEEDLE)\t\t\t\\\n  __glibc_const_generic (HAYSTACK, const char *,\t\\\n\t\t\t strstr (HAYSTACK, NEEDLE))\n# endif\n#endif\n\n\n/* Divide S into tokens separated by characters in DELIM.  */\nextern char *strtok (char *__restrict __s, const char *__restrict __delim)\n     __THROW __nonnull ((2));\n\n/* Divide S into tokens separated by characters in DELIM.  Information\n   passed between calls are stored in SAVE_PTR.  */\nextern char *__strtok_r (char *__restrict __s,\n\t\t\t const char *__restrict __delim,\n\t\t\t char **__restrict __save_ptr)\n     __THROW __nonnull ((2, 3));\n#ifdef __USE_POSIX\nextern char *strtok_r (char *__restrict __s, const char *__restrict __delim,\n\t\t       char **__restrict __save_ptr)\n     __THROW __nonnull ((2, 3));\n#endif\n\n#ifdef __USE_MISC\n/* Similar to `strstr' but this function ignores the case of both strings.  */\n# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\" char *strcasestr (char *__haystack, const char *__needle)\n     __THROW __asm (\"strcasestr\") __attribute_pure__ __nonnull ((1, 2));\nextern \"C++\" const char *strcasestr (const char *__haystack,\n\t\t\t\t     const char *__needle)\n     __THROW __asm (\"strcasestr\") __attribute_pure__ __nonnull ((1, 2));\n# else\nextern char *strcasestr (const char *__haystack, const char *__needle)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n# endif\n#endif\n\n#ifdef __USE_MISC\n/* Find the first occurrence of NEEDLE in HAYSTACK.\n   NEEDLE is NEEDLELEN bytes long;\n   HAYSTACK is HAYSTACKLEN bytes long.  */\nextern void *memmem (const void *__haystack, size_t __haystacklen,\n\t\t     const void *__needle, size_t __needlelen)\n     __THROW __attribute_pure__ __nonnull ((1, 3))\n    __attr_access ((__read_only__, 1, 2))\n    __attr_access ((__read_only__, 3, 4));\n\n/* Copy N bytes of SRC to DEST, return pointer to bytes after the\n   last written byte.  */\nextern void *__mempcpy (void *__restrict __dest,\n\t\t\tconst void *__restrict __src, size_t __n)\n     __THROW __nonnull ((1, 2));\nextern void *mempcpy (void *__restrict __dest,\n\t\t      const void *__restrict __src, size_t __n)\n     __THROW __nonnull ((1, 2));\n#endif\n\n\n/* Return the length of S.  */\nextern size_t strlen (const char *__s)\n     __THROW __attribute_pure__ __nonnull ((1));\n\n#ifdef\t__USE_XOPEN2K8\n/* Find the length of STRING, but scan at most MAXLEN characters.\n   If no '\\0' terminator is found in that many characters, return MAXLEN.  */\nextern size_t strnlen (const char *__string, size_t __maxlen)\n     __THROW __attribute_pure__ __nonnull ((1));\n#endif\n\n\n/* Return a string describing the meaning of the `errno' code in ERRNUM.  */\nextern char *strerror (int __errnum) __THROW;\n#ifdef __USE_XOPEN2K\n/* Reentrant version of `strerror'.\n   There are 2 flavors of `strerror_r', GNU which returns the string\n   and may or may not use the supplied temporary buffer and POSIX one\n   which fills the string into the buffer.\n   To use the POSIX version, -D_XOPEN_SOURCE=600 or -D_POSIX_C_SOURCE=200112L\n   without -D_GNU_SOURCE is needed, otherwise the GNU version is\n   preferred.  */\n# if defined __USE_XOPEN2K && !defined __USE_GNU\n/* Fill BUF with a string describing the meaning of the `errno' code in\n   ERRNUM.  */\n#  ifdef __REDIRECT_NTH\nextern int __REDIRECT_NTH (strerror_r,\n\t\t\t   (int __errnum, char *__buf, size_t __buflen),\n\t\t\t   __xpg_strerror_r) __nonnull ((2))\n    __attr_access ((__write_only__, 2, 3));\n#  else\nextern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen)\n     __THROW __nonnull ((2)) __attr_access ((__write_only__, 2, 3));\n#   define strerror_r __xpg_strerror_r\n#  endif\n# else\n/* If a temporary buffer is required, at most BUFLEN bytes of BUF will be\n   used.  */\nextern char *strerror_r (int __errnum, char *__buf, size_t __buflen)\n     __THROW __nonnull ((2)) __wur  __attr_access ((__write_only__, 2, 3));\n# endif\n\n# ifdef __USE_GNU\n/* Return a string describing the meaning of tthe error in ERR.  */\nextern const char *strerrordesc_np (int __err) __THROW;\n/* Return a string with the error name in ERR.  */\nextern const char *strerrorname_np (int __err) __THROW;\n# endif\n#endif\n\n#ifdef __USE_XOPEN2K8\n/* Translate error number to string according to the locale L.  */\nextern char *strerror_l (int __errnum, locale_t __l) __THROW;\n#endif\n\n#ifdef __USE_MISC\n# include <strings.h>\n\n/* Set N bytes of S to 0.  The compiler will not delete a call to this\n   function, even if S is dead after the call.  */\nextern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1))\n    __fortified_attr_access (__write_only__, 1, 2);\n\n/* Return the next DELIM-delimited token from *STRINGP,\n   terminating it with a '\\0', and update *STRINGP to point past it.  */\nextern char *strsep (char **__restrict __stringp,\n\t\t     const char *__restrict __delim)\n     __THROW __nonnull ((1, 2));\n#endif\n\n#ifdef\t__USE_XOPEN2K8\n/* Return a string describing the meaning of the signal number in SIG.  */\nextern char *strsignal (int __sig) __THROW;\n\n# ifdef __USE_GNU\n/* Return an abbreviation string for the signal number SIG.  */\nextern const char *sigabbrev_np (int __sig) __THROW;\n/* Return a string describing the meaning of the signal number in SIG,\n   the result is not translated.  */\nextern const char *sigdescr_np (int __sig) __THROW;\n# endif\n\n/* Copy SRC to DEST, returning the address of the terminating '\\0' in DEST.  */\nextern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)\n     __THROW __nonnull ((1, 2));\nextern char *stpcpy (char *__restrict __dest, const char *__restrict __src)\n     __THROW __nonnull ((1, 2));\n\n/* Copy no more than N characters of SRC to DEST, returning the address of\n   the last character written into DEST.  */\nextern char *__stpncpy (char *__restrict __dest,\n\t\t\tconst char *__restrict __src, size_t __n)\n     __THROW __nonnull ((1, 2));\nextern char *stpncpy (char *__restrict __dest,\n\t\t      const char *__restrict __src, size_t __n)\n     __THROW __nonnull ((1, 2));\n#endif\n\n#ifdef __USE_MISC\n/* Copy at most N - 1 characters from SRC to DEST.  */\nextern size_t strlcpy (char *__restrict __dest,\n\t\t       const char *__restrict __src, size_t __n)\n  __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 3));\n\n/* Append SRC to DEST, possibly with truncation to keep the total size\n   below N.  */\nextern size_t strlcat (char *__restrict __dest,\n\t\t       const char *__restrict __src, size_t __n)\n  __THROW __nonnull ((1, 2))  __attr_access ((__read_write__, 1, 3));\n#endif\n\n#ifdef\t__USE_GNU\n/* Compare S1 and S2 as strings holding name & indices/version numbers.  */\nextern int strverscmp (const char *__s1, const char *__s2)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n\n/* Sautee STRING briskly.  */\nextern char *strfry (char *__string) __THROW __nonnull ((1));\n\n/* Frobnicate N bytes of S.  */\nextern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1))\n    __attr_access ((__read_write__, 1, 2));\n\n# ifndef basename\n/* Return the file name within directory of FILENAME.  We don't\n   declare the function if the `basename' macro is available (defined\n   in <libgen.h>) which makes the XPG version of this function\n   available.  */\n#  ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\" char *basename (char *__filename)\n     __THROW __asm (\"basename\") __nonnull ((1));\nextern \"C++\" const char *basename (const char *__filename)\n     __THROW __asm (\"basename\") __nonnull ((1));\n#  else\nextern char *basename (const char *__filename) __THROW __nonnull ((1));\n#  endif\n# endif\n#endif\n\n#if __GNUC_PREREQ (3,4)\n# if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function\n/* Functions with security checks.  */\n#  include <bits/string_fortified.h>\n# endif\n#endif\n\n__END_DECLS\n\n#endif /* string.h  */\n"},
                          "roles": ["resultFile"]}],
           "results": [{"ruleId": "-Wanalyzer-possible-null-argument",
                        "taxa": [{"id": "690",
                                  "toolComponent": {"name": "cwe"}}],
                        "properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                       "gcc/analyzer/saved_diagnostic/ploc": {"enode": 997},
                                       "gcc/analyzer/saved_diagnostic/var": "_1",
                                       "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(231)",
                                       "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                       "gcc/analyzer/saved_diagnostic/idx": 2,
                                       "gcc/analyzer/saved_diagnostic/duplicates": [{"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 56},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "_1",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(231)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 1,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "possible_null_arg"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 56},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "_1",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(231)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 0,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "possible_null_arg"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 997},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "_1",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(231)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 3,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "possible_null_arg"}}],
                                       "gcc/analyzer/pending_diagnostic/kind": "possible_null_arg"},
                        "level": "warning",
                        "message": {"text": "use of possibly-NULL ‘malloc(4096)’ where non-null expected"},
                        "locations": [{"physicalLocation": {"artifactLocation": {"uri": "fixed-buf-iter.c",
                                                                                 "uriBaseId": "PWD"},
                                                            "region": {"startLine": 42,
                                                                       "startColumn": 17,
                                                                       "endColumn": 53},
                                                            "contextRegion": {"startLine": 42,
                                                                              "snippet": {"text": "\t\tmemset(iov[i].iov_base, 0, BUF_SIZE);\n"}}},
                                       "logicalLocations": [{"index": 0,
                                                             "fullyQualifiedName": "test"}]}],
                        "codeFlows": [{"threadFlows": [{"id": "main",
                                                        "locations": [{"properties": {"gcc/analyzer/checker_event/emission_id": "(1)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 44,
                                                                                                                                 "dst_id": 47}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fixed-buf-iter.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 28,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 28,
                                                                                                                           "snippet": {"text": "\tif (fd_in < 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 1},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(2)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 44,
                                                                                                                                 "dst_id": 47}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fixed-buf-iter.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 33,
                                                                                                                    "startColumn": 18,
                                                                                                                    "endColumn": 44},
                                                                                                         "contextRegion": {"startLine": 33,
                                                                                                                           "snippet": {"text": "\tfd_out = open(OUT_FD, O_RDWR, 0644);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 2},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(3)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 48,
                                                                                                                                 "dst_id": 53}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fixed-buf-iter.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 34,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 34,
                                                                                                                           "snippet": {"text": "\tif (fd_out < 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 3},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(4)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 48,
                                                                                                                                 "dst_id": 53}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fixed-buf-iter.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 34,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 34,
                                                                                                                           "snippet": {"text": "\tif (fd_out < 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 4},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(5)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 55,
                                                                                                                                 "dst_id": 56}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fixed-buf-iter.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 39,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 39,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < BUFFERS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i == 0’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 5},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(6)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 55,
                                                                                                                                 "dst_id": 56}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fixed-buf-iter.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 40,
                                                                                                                    "startColumn": 35,
                                                                                                                    "endColumn": 51},
                                                                                                         "contextRegion": {"startLine": 40,
                                                                                                                           "snippet": {"text": "\t\tiov[i].iov_base = malloc(BUF_SIZE);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 6},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(7)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fixed-buf-iter.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 40,
                                                                                                                    "startColumn": 35,
                                                                                                                    "endColumn": 51},
                                                                                                         "contextRegion": {"startLine": 40,
                                                                                                                           "snippet": {"text": "\t\tiov[i].iov_base = malloc(BUF_SIZE);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "this call could return NULL"}},
                                                                       "kinds": ["acquire",
                                                                                 "memory"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 7},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(8)",
                                                                                      "gcc/analyzer/checker_event/kind": "warning"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fixed-buf-iter.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 42,
                                                                                                                    "startColumn": 17,
                                                                                                                    "endColumn": 53},
                                                                                                         "contextRegion": {"startLine": 42,
                                                                                                                           "snippet": {"text": "\t\tmemset(iov[i].iov_base, 0, BUF_SIZE);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "argument 1 (‘malloc(4096)’) from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected"}},
                                                                       "kinds": ["danger"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 8}]}]}],
                        "relatedLocations": [{"physicalLocation": {"artifactLocation": {"uri": "/usr/include/string.h"},
                                                                   "region": {"startLine": 65,
                                                                              "startColumn": 14,
                                                                              "endColumn": 20},
                                                                   "contextRegion": {"startLine": 65,
                                                                                     "snippet": {"text": "extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));\n"}}},
                                              "message": {"text": "argument 1 of ‘memset’ must be non-null"},
                                              "properties": {"nestingLevel": 0},
                                              "id": 0,
                                              "relationships": [{"target": 1,
                                                                 "kinds": ["isIncludedBy"]}]},
                                             {"physicalLocation": {"artifactLocation": {"uri": "fixed-buf-iter.c",
                                                                                        "uriBaseId": "PWD"},
                                                                   "region": {"startLine": 8},
                                                                   "contextRegion": {"startLine": 8,
                                                                                     "snippet": {"text": "#include <string.h>\n"}}},
                                              "relationships": [{"target": 0,
                                                                 "kinds": ["includes"]}],
                                              "id": 1}]}],
           "logicalLocations": [{"name": "test",
                                 "fullyQualifiedName": "test",
                                 "decoratedName": "test",
                                 "kind": "function",
                                 "index": 0}]}]}
